{"id":38844138,"url":"https://github.com/cachebag/rlox","last_synced_at":"2026-01-17T14:02:45.220Z","repository":{"id":300117195,"uuid":"1004666318","full_name":"cachebag/rlox","owner":"cachebag","description":"Rust implementation of Lox from \"Crafting Interpreters\" by Robert Nystrom.","archived":false,"fork":false,"pushed_at":"2025-07-30T23:55:20.000Z","size":313,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-07-31T02:12:14.059Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cachebag.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-06-19T01:59:22.000Z","updated_at":"2025-07-30T23:55:23.000Z","dependencies_parsed_at":"2025-06-20T00:35:23.584Z","dependency_job_id":"8a2b4ae9-1522-4d52-8328-c00cd927365b","html_url":"https://github.com/cachebag/rlox","commit_stats":null,"previous_names":["cachebag/rlox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cachebag/rlox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Frlox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Frlox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Frlox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Frlox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cachebag","download_url":"https://codeload.github.com/cachebag/rlox/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cachebag%2Frlox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28509848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-17T14:02:45.151Z","updated_at":"2026-01-17T14:02:45.208Z","avatar_url":"https://github.com/cachebag.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rlox 🦀\n#### Yet another implementation of Lox in Rust, via _Robert Nystrom’s_ Crafting Interpreters\n#\n\nThis is (an attempt at) a faithful, idiomatic re-implementation of Lox (which was built in Java) in Rust. More than anything, it's an exercise.  \n\n# Usage\n1. Clone and build\n```zsh\ngit clone https://github.com/cachebag/rlox.git\ncd rlox\ncargo build --release\n```\n2. Run REPL (currently stateless)\n```zsh\ncargo run\n\n\u003e print \"Hello, world!\";\nHello, World!\n\n\u003e var msg = 10 != 100 ? \"true\" : \"false\"; print msg;\ntrue\n```\n3. Run a `lox` file\n```JavaScript\n// examples/recursive_fib.lox\nfn fib(n) {\n  return n \u003c= 1 ? n : fib(n - 2) + fib(n - 1);\n}\n\nfor (var i = 0; i \u003c 20; i = i + 1) {\n  print fib(i);\n}\n```\n\n```bash\ncargo run examples/recursive_fib.lox\n\n0\n1\n1\n2\n3\n5\n8\n13\n21\n...\n```\n# Debug\nYou can print the tokens of a given file or `stdin` input.\n\n```bash\ncargo run show-tokens \u003cfile\u003e # Scans the given file and prints its tokens.\n\ncargo run show-tokens - # Reads from stdin and prints tokens.\n```\nYou can also print the parsed AST for a given file or input.\n\n```bash\ncargo run show-ast \u003cfile\u003e [output.txt] # Prints the parsed AST for the given file. (defaults to ast_output.txt if no name is given\n\ncargo run show-ast - [output.txt] - # Stdin \n```\n\n# Resources\n- [_Crafting Interpreters_](https://craftinginterpreters.com/)\n- _[The Rust Programming Language](https://doc.rust-lang.org/book/title-page.html)_ \n- [_Rust by Example_](https://doc.rust-lang.org/rust-by-example/)\n- [_Rust Ownership, Borrowing and Lifetimes_](https://www.integralist.co.uk/posts/rust-ownership/)\n- [_Becoming a Rust master_](https://www.youtube.com/watch?v=dQw4w9WgXcQ)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcachebag%2Frlox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcachebag%2Frlox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcachebag%2Frlox/lists"}