Eyuan
open main menu

Ruskey

Ruskey

Ruskey πŸ¦€

An implementation of the Monkey programming language interpreter in Rust, based on the book β€œWriting An Interpreter In Go” by Thorsten Ball.

About

🚧 Work In Progress 🚧

This project is currently under active development. It’s a Rust implementation of the Monkey programming language introduced in the book β€œWriting An Interpreter In Go”. It serves as both a learning exercise for Rust and interpreter design.

The Monkey language features:

  • C-like syntax
  • Variable bindings
  • Integer and boolean data types
  • Functions as first-class citizens
  • Closures
  • A simple object system

Project Structure

ruskey/
β”œβ”€β”€ src/           # Source code
β”‚   β”œβ”€β”€ token.rs   # Token definitions
β”‚   β”œβ”€β”€ lexer.rs   # Lexical analyzer
β”‚   β”œβ”€β”€ ast.rs     # Abstract Syntax Tree
β”‚   β”œβ”€β”€ parser.rs  # Parser
β”‚   └── ...
β”œβ”€β”€ tests/         # Test suite
└── ...

Progress

  • Lexer implementation
  • Parser implementation
  • AST evaluator
  • Object system
  • Environment
  • Function evaluation

Building and Running

# Build the project
cargo build

# Run tests
cargo test

# Run the REPL
cargo run

Learning Resources

If you’re interested in learning more about interpreters or following along with this project:

  1. β€œWriting An Interpreter In Go” by Thorsten Ball