Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shuhei/cymbal
Yet another Rust implementation of the Monkey language from "Writing an Interpreter in Go" and "Writing a Compiler in Go"
https://github.com/shuhei/cymbal
compiler interpreter monkey-programming-language virtual-machine
Last synced: 2 months ago
JSON representation
Yet another Rust implementation of the Monkey language from "Writing an Interpreter in Go" and "Writing a Compiler in Go"
- Host: GitHub
- URL: https://github.com/shuhei/cymbal
- Owner: shuhei
- License: mit
- Created: 2019-03-05T23:55:28.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-01-27T16:02:14.000Z (almost 2 years ago)
- Last Synced: 2024-10-18T16:45:42.705Z (3 months ago)
- Topics: compiler, interpreter, monkey-programming-language, virtual-machine
- Language: Rust
- Homepage:
- Size: 188 KB
- Stars: 81
- Watchers: 3
- Forks: 11
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cymbal
Yet another Rust implementation of the Monkey language from "Writing an Interpreter in Go" and "Writing a Compiler in Go."
[![CircleCI](https://circleci.com/gh/shuhei/cymbal.svg?style=svg)](https://circleci.com/gh/shuhei/cymbal)
## Development
Start REPL:
```sh
# Run in eval mode to directly evaluate AST
cargo run -- repl
# or
cargo run -- repl --eval# Run in compile mode to compile AST into bytecode and execute it on VM
cargo run -- repl --compile
```Build:
```sh
cargo build
```Test:
```sh
cargo test
```Benchmark with recursive fibonacci:
```sh
cargo run --release -- benchmark --eval
cargo run --release -- benchmark --compile
```## License
MIT