Skip to content
Monkey language implemented with rust
Rust JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.



Rust implementation of Monkey programming language from the book Writing an Interpreter in Go. This interpreter is also compiled into WebAssembly format so it can run on browser.


Install Rust Toolchain

Follow these instructions to install Rust Toolchain

Install npm

npm is not necessary if you are only running the REPL Follow these instructions to install npm

If you already have npm installed, make sure it is up to date with the command below:

$ sudo npm install npm@latest -g


Running the REPL

Build the project using cargo

$ cargo build --release
    Finished release [optimized] target(s) in 5m 16s 

Start the repl

$ target/release/monkey_repl
Welcome to the Monkey programming language!
Feel free to type in commands
>> 1 + 1
>> exit

Running it on browsers

Install the dependencies

In the web directory, run npm install to install the local development server and its dependencies.

$ sudo npm install

Use the local package in web

In the pkg directory, run npm link so that the local package can be depended upon by other local packages without publishing them to npm.

$ sudo npm link

In the web directory, run npm link monkey_wasm to use the linked verstion of the monkey_wasm.

$ sudo npm link monkey_wasm

Serving Locally

Run the server with npm run start and navigate your Web browser to http://localhost:8080/ and you should be able to run monkey language on the browser.


You can’t perform that action at this time.