{"id":13998188,"url":"https://github.com/eatonphil/lust","last_synced_at":"2025-03-16T22:30:49.933Z","repository":{"id":40389912,"uuid":"442337852","full_name":"eatonphil/lust","owner":"eatonphil","description":"A parser, compiler, and virtual machine evaluator for a minimal subset of Lua; written from scratch in Rust.","archived":false,"fork":false,"pushed_at":"2021-12-29T19:51:58.000Z","size":38,"stargazers_count":188,"open_issues_count":0,"forks_count":11,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-13T04:12:46.032Z","etag":null,"topics":["compiler","interpreter","lua","rust","virtual-machine"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eatonphil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-12-28T03:27:00.000Z","updated_at":"2024-09-30T19:17:03.000Z","dependencies_parsed_at":"2022-08-22T13:10:28.385Z","dependency_job_id":null,"html_url":"https://github.com/eatonphil/lust","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/eatonphil%2Flust","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eatonphil%2Flust/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eatonphil%2Flust/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eatonphil%2Flust/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eatonphil","download_url":"https://codeload.github.com/eatonphil/lust/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221668362,"owners_count":16860631,"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","lua","rust","virtual-machine"],"created_at":"2024-08-09T19:01:27.977Z","updated_at":"2024-10-27T11:26:03.693Z","avatar_url":"https://github.com/eatonphil.png","language":"Rust","readme":"# lust: Lua in Rust\n\nThis project implements a parser, compiler, and virtual machine\nevaluator for a minimal subset of Lua. It is written from scratch in\nRust.\n\nSee the companion blog post, [Writing a minimal Lua implementation\nwith a virtual machine from scratch in Rust\n](https://notes.eatonphil.com/lua-in-rust.html), for a guided\nwalkthrough of the code.\n\n## Example\n\n```bash\n$ cargo build --release\n$ cat test/fib.lua\nfunction fib(n)\n   if n \u003c 2 then\n      return n;\n   end\n\n   local n1 = fib(n-1);\n   local n2 = fib(n-2);\n   return n1 + n2;\nend\n\nprint(fib(30));\n$ time ./target/release/lust test/fib.lua\n832040\n./target/release/lust test/fib.lua  0.29s user 0.00s system 99% cpu 0.293 total\n$ time lua test/fib.lua\n832040\nlua test/fib.lua  0.06s user 0.00s system 99% cpu 0.063 total\n```\n\n## More examples\n\nSee the test directory.","funding_links":[],"categories":["Rust"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Featonphil%2Flust","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Featonphil%2Flust","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Featonphil%2Flust/lists"}