Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ratel-rust/ratel-core
High performance JavaScript to JavaScript compiler with a Rust core
https://github.com/ratel-rust/ratel-core
ast compiler javascript parser performance rust transpiler
Last synced: 7 days ago
JSON representation
High performance JavaScript to JavaScript compiler with a Rust core
- Host: GitHub
- URL: https://github.com/ratel-rust/ratel-core
- Owner: ratel-rust
- License: apache-2.0
- Created: 2016-04-21T00:03:01.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T02:42:38.000Z (almost 2 years ago)
- Last Synced: 2024-12-12T03:13:16.583Z (14 days ago)
- Topics: ast, compiler, javascript, parser, performance, rust, transpiler
- Language: Rust
- Homepage:
- Size: 2.15 MB
- Stars: 435
- Watchers: 14
- Forks: 17
- Open Issues: 45
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
![Ratel](http://maciej.codes/things/ratel-400.png)
# ratel-core
[![Travis CI](https://travis-ci.org/ratel-rust/ratel-core.svg)](https://travis-ci.org/ratel-rust/ratel-core)
[![Crates.io](https://img.shields.io/crates/v/ratel.svg)](https://crates.io/crates/ratel)
[![Discord](https://img.shields.io/discord/530727712969588746.svg?logo=discord)](https://discord.gg/5YmRBvu)
[![Gitter](https://img.shields.io/gitter/room/ratel-rust/Lobby.svg?logo=gitter)](https://gitter.im/ratel-rust/Lobby)**Ratel** is a high performance JavaScript to JavaScript compiler with a Rust core. Its goal is to take newest versions of JavaScript as input, and produce output that's compatible with older versions of the language.
[**Online REPL with Wasm**](http://maciej.codes/ratel-wasm/), courtesy of [cmtt](https://github.com/cmtt).
This repo is split in two separate folders:
- `core` contains the main Rust codebase that does all the heavy lifting.
- `ffi` contains the Node.js wrapper around the Rust core with [Neon](https://neon-bindings.com/) bindings.For common usage checkout the [ratel-cli](https://github.com/ratel-rust/ratel-cli) repo.
## Performance
While still incomplete, the Parser part of **Ratel** can run circles around even the fastest parsers built in JavaScript, here it is compared to [Esprima](http://esprima.org/) using the ratel FFI.
![ratel chart](https://user-images.githubusercontent.com/787228/46786973-beee0c80-cd36-11e8-989a-62b92d624d38.png)
The benchmarks visualized above can be executed in the `ffi` folder using the `npm run benches` command.
## Contributors
This project is created and maintained by [Maciej Hirsz](https://github.com/maciejhirsz) with the help of awesome [contributors](https://github.com/ratel-rust/ratel-core/graphs/contributors). Extended thanks to:
- [cmtt](https://github.com/cmtt) for work on the Node.js FFI and testing.
- [Jan Schulte](https://github.com/schultyy) for the initial version of transformer and codegen.## Logo
The smirky **Ratel** by the courtesy of [A. L. Palmer](https://www.behance.net/alpalmer60b4).
## License
This code is distributed under the terms of both the MIT license
and the Apache License (Version 2.0), choose whatever works for you.See [LICENSE-APACHE](LICENSE-APACHE) and [LICENSE-MIT](LICENSE-MIT) for details.