Skip to content

Stage 1: shared Rust typing engine and browser Wasm - #184

Open
voltcrash wants to merge 93 commits into
mainfrom
t3/rust-engine-migration
Open

voltcrash wants to merge 93 commits into
mainfrom
t3/rust-engine-migration

Conversation

@voltcrash

@voltcrash voltcrash commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

Provide the platform-independent Rust engine and generated browser Wasm bindings for the existing typing behavior. Stage 1 of three stacked PRs; the website still uses its TypeScript engine until Stage 2, followed by the offline Ratatui app in Stage 3.

Rust owns input/progression/timing, generation/transforms, shared configuration policies, scores/results, replay, pace and learning. Hosts supply UTF-16 text, clocks, content and observations. The facade provides owner-scoped initialization, disposal, structured recovery, generation-tagged asynchronous sources and bounded incremental updates. Original reference snapshots remain unchanged; actual-web/headless discrepancies are explicitly classified.

Verification:

  • Native suite, Clippy and formatting pass. Parity covers 19 command traces, all 61 original generator snapshots, section/fractional/live rules, quote queue RNG, eight historical results and 1,387 live prefixes.
  • Built Cloudflare proof: 24 browser cases pass, including schema compatibility, eight unchanged transport hashes/backend outcomes, Unicode history/replay, lifecycle and download/version failures.
  • Malformed/bounded DTOs and 128-seed / 12,800-command lifecycle stress pass; backend suite passes 787 tests.
  • Optimized Wasm: 755,466 raw / 301,279 gzip6 bytes, within frozen budgets. Final timing rerun passes: initialization p95 45.1 ms, boundary p95 0.01050 ms/unit; 13,540-byte deployed facade. Baseline reset retains 9,240,576 Wasm bytes.
  • Isolated e7b7ad8 checkout with deleted target/generated/dist passes the actual Cloudflare build and all workspace typechecks. Earlier first-test/typecheck bootstrap also passes. Full CI passes at final Stage 1 head dc84395: engine/native/Wasm, frontend/backend/packages, all browser shards, SSR, delivery, updates, assets, quality and ci-ok. Marked ready for review; website integration continues in stacked PR feat(web): migrate website typing runtime to Rust and Wasm #185.

No production deployment or release publication. Full website host behavior/delivery/performance cutover is Stage 2; native platform packaging/manual terminal matrix is Stage 3. Wasm retains its high-water linear allocation: the 2,000-unit reset budget passes; the separately reported 20,000-unit/full-log soak does not claim memory shrinks to baseline.

API: packages/typing-engine/README.md. Acceptance evidence, immutable provenance, compatibility decisions and performance conditions: docs/rust-engine/.

@voltcrash voltcrash added the force-full-ci Run all CI component jobs for a pull request label Oct 22, 2026

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant