Skip to content

Implementation of an interpreter for the Monkey language written in Rust, currently under active development.

License

Notifications You must be signed in to change notification settings

DeveloperC286/monkey_interpreter

Repository files navigation

Monkey Interpreter

GitHub Release Continuous Integration (CI) Conventional Commits License

The Monkey Programming Language Logo

Implementation of an interpreter for the Monkey language written in Rust, currently under active development.

What is Monkey?

The Monkey programming language was devised by Thorsten Ball for use in his follow along books Writing An Interpreter In Go and Writing A Compiler In Go.

Monkey has a C-like syntax, supports variable bindings, prefix and infix operators, has first-class and higher-order functions, can handle closures with ease and has integers, booleans, arrays and hashes built-in.

Content

Usage

Usage - Logging

The crates pretty_env_logger and log are used to provide logging. The environment variable RUST_LOG can be used to set the logging level. See https://crates.io/crates/pretty_env_logger for more detailed documentation.

Downloading Binary

Statically linked compiled binaries are available for download. Visit the releases page at https://gitlab.com/DeveloperC/monkey_interpreter/-/releases to see all the releases, the release notes contains links to binary downloads for various architectures.

If you do not trust the provided binaries another option is to compile your own and then make it available for remote download, so your CICD etc can then download it.

Compiling via Local Repository

Checkout the code repository locally, change into the repository's directory and then build via Cargo. Using the --release flag produces an optimised binary but takes longer to compile.

git clone git@gitlab.com:DeveloperC/monkey_interpreter.git
cd monkey_interpreter/
cargo build --release

The compiled binary is present in target/release/monkey_interpreter.

Unit Testing

The unit test suite has several parameterised tests, Cargo is used to set up and run all the unit tests.

cargo test

Issues/Feature Requests

To report a bug/issue or request a new feature use https://github.com/DeveloperC286/monkey_interpreter/issues.

About

Implementation of an interpreter for the Monkey language written in Rust, currently under active development.

Resources

License

Stars

Watchers

Forks

Packages

No packages published