{"id":22413825,"url":"https://github.com/jasonjmcghee/basic-treesitter-cranelift-jit","last_synced_at":"2025-10-05T12:24:56.974Z","repository":{"id":266023680,"uuid":"897137975","full_name":"jasonjmcghee/basic-treesitter-cranelift-jit","owner":"jasonjmcghee","description":"Simple live calculator in tree-sitter + cranelift jit","archived":false,"fork":false,"pushed_at":"2024-12-02T16:51:49.000Z","size":93,"stargazers_count":71,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T03:31:56.503Z","etag":null,"topics":["calculator","compilers","cranelift","cranelift-jit","interpreter","jit","parsing","syntax-highlighting","tree-sitter"],"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/jasonjmcghee.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}},"created_at":"2024-12-02T05:10:23.000Z","updated_at":"2025-03-24T14:25:54.000Z","dependencies_parsed_at":"2025-03-27T03:39:41.381Z","dependency_job_id":null,"html_url":"https://github.com/jasonjmcghee/basic-treesitter-cranelift-jit","commit_stats":null,"previous_names":["jasonjmcghee/basic-treesitter-cranelift-jit"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonjmcghee%2Fbasic-treesitter-cranelift-jit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonjmcghee%2Fbasic-treesitter-cranelift-jit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonjmcghee%2Fbasic-treesitter-cranelift-jit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jasonjmcghee%2Fbasic-treesitter-cranelift-jit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jasonjmcghee","download_url":"https://codeload.github.com/jasonjmcghee/basic-treesitter-cranelift-jit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773720,"owners_count":20993639,"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":["calculator","compilers","cranelift","cranelift-jit","interpreter","jit","parsing","syntax-highlighting","tree-sitter"],"created_at":"2024-12-05T14:14:40.887Z","updated_at":"2025-10-05T12:24:56.891Z","avatar_url":"https://github.com/jasonjmcghee.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Basic tree-sitter + cranelift jit\n\nA basic working example of tree-sitter + cranelift jit.\n\nThere's really one core file - I could break it up, but wanted it to be in one place for this basic example.\n\n[The one core file](src/language/mod.rs)\n\nHere's the [grammar](./tree-sitter-calculator/grammar.js).\n\n## Video\n\nhttps://github.com/user-attachments/assets/d30d0925-f0c4-461a-b8dc-03c2d1aef6c0\n\n## Testing things\nYou can run the repl (using crossterm)\n\n```bash\ncargo run --release\n```\n\nOr do a little stress test (using cross term)\n\n```bash\ncargo run --example stress\n```\n\n## Benchmarks\n\nAlso some simple benchmarks.\n\nVery similar to the \"stress\" test\n\n```bash\n cargo bench --bench calculator_random_bench\n ```\n\nAnd a more basic, non-random one\n\n```bash\n cargo bench --bench calculator_bench\n```\n\n## Modifying things\n\nIf you modify the [grammar](./tree-sitter-calculator/grammar.js), `cargo build` in the main project will update everything as needed.\n\nThe main binary uses syntax highlighting as an example of that.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonjmcghee%2Fbasic-treesitter-cranelift-jit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjasonjmcghee%2Fbasic-treesitter-cranelift-jit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjasonjmcghee%2Fbasic-treesitter-cranelift-jit/lists"}