{"id":15462376,"url":"https://github.com/poteto/monkers","last_synced_at":"2025-04-22T10:37:49.655Z","repository":{"id":47147532,"uuid":"247885278","full_name":"poteto/monkers","owner":"poteto","description":"Bytecode compiler and VM for the Monkeylang language, written in Rust","archived":false,"fork":false,"pushed_at":"2023-05-24T12:41:42.000Z","size":188,"stargazers_count":47,"open_issues_count":5,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-22T10:37:34.136Z","etag":null,"topics":["compiler","interpreter","monkey-language","programming-language","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/poteto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-03-17T05:16:43.000Z","updated_at":"2024-11-16T01:56:08.000Z","dependencies_parsed_at":"2025-04-16T17:13:35.499Z","dependency_job_id":null,"html_url":"https://github.com/poteto/monkers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poteto%2Fmonkers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poteto%2Fmonkers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poteto%2Fmonkers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/poteto%2Fmonkers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/poteto","download_url":"https://codeload.github.com/poteto/monkers/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250221961,"owners_count":21394794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","interpreter","monkey-language","programming-language","rust"],"created_at":"2024-10-02T00:01:39.767Z","updated_at":"2025-04-22T10:37:49.619Z","avatar_url":"https://github.com/poteto.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# monkers 🐒 + 🦀\n\n[![Rust](https://github.com/poteto/monkers/actions/workflows/rust.yml/badge.svg?branch=main)](https://github.com/poteto/monkers/actions/workflows/rust.yml)\n\nShort for `monkey-rs`. An implementation of [monkeylang](https://monkeylang.org/). Previously, I implemented the interpreter in [TypeScript](https://github.com/poteto/boba-js). I am re-implementing the interpreter and later compiler in Rust as a learning exercise.\n\n## Building\n\n```shell\n$ cargo build --release\n\n# See help\n$ target/release/monkers --help\n\n# Run the REPL with bytecode compilation\n$ target/release/monkers\n\n# Run the REPL with the tree-walking interpreter\n$ target/release/monkers -s interpreted\n```\n\n## Developing\n\n### Development REPL\n\nStart the REPL by running `cargo run`, then entering some Monkey:\n\n```\n🐒 \u003e\u003e let a = 5;\n5\n🐒 \u003e\u003e let b = a \u003e 3;\ntrue\n🐒 \u003e\u003e let c = a * 99;\n495\n🐒 \u003e\u003e if (b) { 10 } else { 1 };\n10\n🐒 \u003e\u003e let d = if (c \u003e a) { 99 } else { 100 };\n99\n🐒 \u003e\u003e d;\n99\n🐒 \u003e\u003e d * c * a;\n245025\n```\n\nOptions can also be enabled:\n\n```\n$ cargo run -- -d               # debug mode\n$ cargo run -- -s interpreted   # eval with interpreter\n```\n\nCommand history is saved in `history.txt`.\n\nBy default, monkers REPL will compile your code into bytecode, then evaluate the bytecode with its VM. You can switch to the slower tree-walking interpreter with an arg:\n\n```\ncargo run -- interpreted\n```\n\n### Helpful crates\n\n#### [`cargo-watch`](https://github.com/passcod/cargo-watch)\n\n`cargo-watch` watches over your Cargo project's source. I use it to run my tests and `cargo check` whenever a file changes. It's aliased to `cargo dev`, which expands to:\n\n```\ncargo watch -x check -x test\n```\n\nOptionally you can append the `RUST_BACKTRACE=1` flag to get backtraces.\n\n## Contributing\n\nPRs are welcome! I am not a Rust expert, so I welcome any recommendations on more idiomatic Rust code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoteto%2Fmonkers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpoteto%2Fmonkers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpoteto%2Fmonkers/lists"}