joints 0.0.0

Incremental parsing built on composable stack effects - a tree-sitter alternative that packs every language into one mmap-able file. Reserved at 0.0.0: the engine is Zig and the Rust binding is not written yet.
Documentation
  • Coverage
  • 100%
    1 out of 1 items documented0 out of 0 items with examples
  • Size
  • Source code size: 22.7 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 112.3 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 2s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • GriffinCanCode

joints

Incremental parsing built on composable stack effects. A parser generator that reads tree-sitter's own grammar.json, so the grammars the ecosystem already wrote are the input, and packs every language into one mmap-able file.

This version exports nothing, on purpose

0.0.0 reserves the name. The engine is Zig, reached through a C ABI (libjnt, jnt_ symbols); the Rust binding over it is not written yet. A stub that returned plausible values would be worse than an empty crate, because a dependency that compiles is one somebody builds on. Nothing will break when the real binding lands, because there is no surface here to break.

The idea

A parse step's effect on the stack is an element of a monoid, so the effects of two adjacent regions compose into the effect of the region containing both. Everything else follows from that one property:

Property Why it holds
Position independence a region parses without knowing what precedes it - its effect is composed in afterward instead of inherited
Parallelism the file cuts into segments that parse independently, then reduce pairwise
Incrementality an edit invalidates only the segments it touches; the surrounding composition is reused, not re-derived
One artifact N languages pack into one file, so a tool ships one binary and one file rather than a shared library per grammar

The claim that composed segment effects really do reproduce a whole-file parse has a falsifier measurable before a parser exists, so that measurement came first - across eleven real grammars, with nothing disagreeing.

Status

Built and tested: the grammar importer, the LR(0) collection with LALR lookaheads and conflict resolution, the terminal scanner, the stack-effect monoid and the cursor that composes it, the balanced tree, the concrete syntax tree with delete-and-supply repair at every refusal, the incremental reparse across edits, the packed multi-language artifact, the CLI, and the C ABI.

Not built: the SIMD first pass, the query engine, the settled succinct encoding, and the quotient the size claim depends on - so the size claim is still a target, not a result.

Source opens under The Billy Company, alongside irregex (the regex engine), gist (indexed ripgrep-parity search), relate (similarity by compression), and blast (provenance and blast radius).

License

Apache-2.0. See LICENSE and NOTICE.