[Roadmap] Core port to Rust after spec freeze #338
Labels
No labels
bug
discussion
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
research
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gram-lang/gram#338
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A question that comes up fairly often is why Gram is written in TypeScript instead of Rust or Go.
For now, staying in TypeScript is a deliberate choice. The language syntax and compiled output are still settling, so keeping a single implementation avoids having to maintain every change twice. It also lets the full compiler run directly in the browser playground (~30 KB gzipped with Ohm.js, which is smaller than a WASM build).
That said, I do plan to port the core pipeline (
parser,kitchen,analyzer,i18n) to Rust for v2.0, once the spec and JSON output have been stable for a few months without breaking changes.A couple of pieces are already in place so that the port won't be a rewrite from scratch:
conformance/), which checks expected JSON outputs independently of the implementation language.tree-sitter-gramfor editor highlighting outside of Ohm.js.v1.7work on cleaner JSON token types and a JSON Schema, which will act as the reference contract for the Rust types.When the switch happens, the goal is to keep the npm packages and JSON outputs compatible for anyone building on top of Gram. Feel free to drop thoughts or questions here.