docs: Rust core port plan — decompose #6 into actionable sub-issues#31
Open
LeslieOA wants to merge 1 commit into
Open
docs: Rust core port plan — decompose #6 into actionable sub-issues#31LeslieOA wants to merge 1 commit into
LeslieOA wants to merge 1 commit into
Conversation
#6 ("port pure-logic core to Rust") has been a single XL backlog item since the initial audit. Daunting to start in that shape — anyone picking it up has to make a dozen architectural decisions before writing any code. This commit adds docs/rust-core-port-plan.md with: - Scope (what ships in Rust, what stays in TS) - Rollout decision options (big-bang vs parallel-with-flag vs per-function migration) with a recommendation - FFI tooling decision options for native (UniFFI vs JSI direct vs Turbo Modules) and for web (wasm-bindgen as the de facto choice) - Cross-impl conformance testing strategy — re-use the 168 tests from #16 against both impls as the safety net - Native build integration sketch (Expo config plugin + react-native fallback for bare RN consumers) - A decomposition into 14 sub-issues (2 L, 5 M, 7 S) in rough dependency order, with brief scope per sub-issue - Six open architectural questions for the maintainer to decide before any of the sub-issues get filed - What was deliberately NOT included (bytecode cache, streaming parse, persistent storage, multi-canvas state — all real ideas, none belonging in #6) Once the maintainer signs off on the open questions, the 14 sub-issues land on the project board and #6 becomes an umbrella tracker. Until then, this doc is the conversation starter — not a commitment to start coding. README's Development section gains a brief "Strategic direction" subsection pointing at the plan and the umbrella issue, so anyone landing on the README sees the trajectory without having to dig. No code changes. Library checks (38/38 tests, typecheck clean, lint exit 0) pass on this branch as expected. Refs: #6 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
docs/rust-core-port-plan.md(~250 lines). Converts #6 from a single XL block into a structured plan with six open architectural questions for you to answer, and a proposed decomposition into 14 sub-issues that get filed once those questions are answered.This PR is not a commitment to start coding. It's a conversation starter that makes #6 reviewable, decision-able, and ready to chunk into parallel work.
Why this is the right next step
Everything we shipped in #2 (port) / #3 (renderer port) / #4 (history refactor) / #5 (Partial → variants) was Rust-port prep. The API is now FFI-friendly. But #6 itself has been "XL, undefined" — anyone picking it up has to make decisions about UniFFI vs JSI, rollout shape, build integration, and testing strategy before writing any Rust. This doc surfaces those decisions explicitly and proposes answers.
The six open questions
Proposed sub-issue decomposition
14 sub-issues, 2 L / 5 M / 7 S, rough dependency order. Most can run in parallel. Realistic delivery: 4-8 weeks elapsed with focused part-time work.
What's deliberately NOT in this plan
Surfaced in the doc itself (§10) but worth flagging: a bytecode cache for parsed canvases, streaming parse, persistent / mmap'd storage, multi-canvas state. All real ideas; none belong in #6. Each could be its own follow-up after Rust ships.
How to use this PR
Verification
npm test: 38/38 (develop hasn't merged the conformance tests from test: conformance tests for JSON Canvas spec + Canvas Candy baseline #29 yet)npm run typecheck: cleannpm run lint: exit 0Refs: #6