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: about 2 months 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 (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-07T02:42:38.000Z (over 2 years ago)
- Last Synced: 2025-04-12T06:05:50.543Z (3 months ago)
- Topics: ast, compiler, javascript, parser, performance, rust, transpiler
- Language: Rust
- Homepage:
- Size: 2.15 MB
- Stars: 436
- Watchers: 13
- Forks: 17
- Open Issues: 45
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README

# ratel-core
[](https://travis-ci.org/ratel-rust/ratel-core)
[](https://crates.io/crates/ratel)
[](https://discord.gg/5YmRBvu)
[](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.

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.