Skip to content
Yet another Rust implementation of the Monkey language from "Writing an Interpreter in Go" and "Writing a Compiler in Go"
Rust
Branch: master
Clone or download
shuhei Move Bytecode to code module
and remove unnecessary Rc and RefCell from constants
Latest commit 6e669be Oct 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci Add CircleCI workflow Mar 13, 2019
src Move Bytecode to code module Oct 17, 2019
.gitignore Implement tokens and lexer Mar 5, 2019
Cargo.lock Fix command options on README Jun 15, 2019
Cargo.toml Stop using default-run option in Cargo.toml Mar 31, 2019
LICENSE Add MIT license Mar 13, 2019
README.md Add builtin exit() function Jun 15, 2019

README.md

Cymbal

Yet another Rust implementation of the Monkey language from "Writing an Interpreter in Go" and "Writing a Compiler in Go."

CircleCI

Development

Start REPL:

# Run in eval mode to directly evaluate AST
cargo run
# or
cargo run -- --eval

# Run in compile mode to compile AST into bytecode and execute it on VM
cargo run -- --compile

Build:

cargo build

Test:

cargo test

Benchmark with recursive fibonacci:

cargo run --release -- --benchmark --eval
cargo run --release -- --benchmark --compile

License

MIT

You can’t perform that action at this time.