Skip to content

Decision: should the jedit stack be pure Rust rather than Node + TypeScript? #310

Description

@flyingrobots

Raised as an open question, not a decision.

The question

Graft and Echo are already Rust. TypeScript is carrying the Bijou TUI layer and the application shell. Node has real fixed costs — process startup, resident memory, and a large module graph to import before the first frame. Is it worth collapsing the stack to Rust end to end, and what would it actually buy?

What this issue needs before it can be decided

Measurements, not intuition. Specifically:

  • Baseline: bare node startup, jedit module-graph import time, time to first frame, RSS at idle, RSS with a large file open
  • Where the time and the memory actually go. One example already found: createInitialModelSnapshot was spending 151.5 ms parsing OBJ meshes for a title screen — that was not a language problem, and removing it cost 143 ms with no rewrite
  • Steady-state cost per keystroke and per render, which is where a TUI actually lives, versus startup cost which is paid once
  • What the TS layer is genuinely doing that Rust would have to reimplement: Bijou widgets, layout, theming, the app/update loop, the command line, drawers, highlighting

Considerations to weigh

  • Bijou is the TUI toolkit and it is TypeScript. A Rust port means either replacing it or reimplementing against a Rust TUI crate — that is the bulk of the work, and it is UI work, not systems work
  • The Echo host is already a native boundary, so the expensive semantics are already out of Node
  • A rewrite pauses feature work for a long time; the measured wins may be dominated by things fixable in place (as the 143 ms was)

Acceptance

An ADR that either commits to the port with numbers behind it, or records the decision not to, with the measurements that justify it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions