monkey-rs 0.1.0

Monkey programming language interpretter.
Documentation
  • Coverage
  • 100%
    77 out of 77 items documented0 out of 19 items with examples
  • Size
  • Source code size: 427.49 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.38 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 25s Average build duration of successful builds.
  • all releases: 25s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • micahkepe/monkey-rs
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • micahkepe

monkey-rs 🦀

GitHub Actions Workflow Status

A Rust implementation of the Monkey programming language from Thorsten Ball's Writing An Interpreter In Go.

"But why the name? Why is it called “Monkey”? Well, because monkeys are magnificent, elegant, fascinating and funny creatures. Exactly like our interpreter" — Thorsten Ball

Quick Start

Usage:

Runs and evaluates the Monkey source file (`*.monkey`), if provided, else starts a Monkey REPL session to run Monkey code

Usage: monkey [FILE]

Arguments:
  [FILE]  Path to a Monkey source file to execute (must have `.monkey` extension)

Options:
  -h, --help  Print help

REPL

To run the Monkey REPL:

cargo run --release

To run tests:

cargo test

Running a .monkey File

To run a Monkey source file:

cargo run --release -- path/to/file.monkey

[!NOTE] The file must have a .monkey extension, or the program will exit with an error message. Only the last evaluated statement's output is printed to stdout (alongside any puts(...) statements).

Documentation

Comprehensive documentation is available as a mdBook.

You can view the live site here

To build and view the documentation locally:

cd docs
mdbook serve

The documentation covers:

  • Language syntax and features
  • Data types and operations
  • Built-in functions
  • REPL usage
  • Functional programming patterns

Contributing

Contributions are welcome! Please open an issue or pull request on GitHub for bug reports, feature requests, or improvements. Ensure code follows Rust conventions and includes tests.

License

This repository is licensed under the MIT License. See LICENSE for more details.