An open API service indexing awesome lists of open source software.

https://github.com/taga3s/rust-monkey

Rust implementation of the Monkey programming language.
https://github.com/taga3s/rust-monkey

monkey-language rust

Last synced: 9 months ago
JSON representation

Rust implementation of the Monkey programming language.

Awesome Lists containing this project

README

          

# rust-monkey

Rust implementation of the Monkey programming language, based on the book *[Writing An Interpreter In Go](https://interpreterbook.com/)*.

This project is work in progress.

## features
- Tree-Walking Interpreter
- interprets the AST on the fly
- No external dependencies
- only uses Rust standard library

## REPL
1. Run the REPL with `just repl` command.

```bash
just repl
```

2. Type in Monkey code and press Enter to execute.

```monkey
>> let add = fn(a, b) { a + b; };
>> add(10, 15);
25
```

## Runner

```bash
just run fixtures/sample1.monkey
```

## Convert to wasm

```bash
just build-wasm
```