docs: Phase 2 — the engine is its own Rust→WASM crate - #6
Merged
Conversation
The simulation moved out of the playground TypeScript into ComlineProject/simulator, a Rust crate → WASM, built on comline-runtime directly (no vendored port, no drift guard) and structured as a discrete-event simulation. The playground / tutorial / docs become thin hosts over its `Sim` wasm-bindgen surface. - new Architecture section: why a separate crate, the module layout, the Shape-JSON boundary, the `script` cargo feature + wasm size - 2f rewritten: a sandboxed Rhai script, not a Worker-sandboxed JS snippet — safe by construction, resource-limited, `state` persists - 2h subsumed: the Rust engine already runs the real runtime contract, so "route A vs route B" and the drift guard no longer exist - 2a–2f marked done (PRs #1–#10); 2g / playground-rewire / 2i remain - open questions / risks pruned of the esbuild-wasm and Worker-CSP items; 2c/2d/2e sections updated to the shipped behaviour
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.
The simulation moved out of the playground TypeScript into
ComlineProject/simulator— a Rust crate → WASM, built oncomline-runtimedirectly and structured as a discrete-event simulation. This revises the Phase 2 spec to match 10 PRs of implementation.Shape-JSON boundary instead of linkingcomline-core), the module layout, thescriptcargo feature + wasm-size note.statepersists between calls.comline-runtimecontract viaGenericDispatch, so "route A vs route B" and the drift guard no longer exist. The esbuild-wasm risk is moot.dead, the single stepped clock, deterministic-by-construction replay).mkdocs build --strictclean.