Refactor WASM REPL into host-driven stdio runtime with streaming interrupts#78
Draft
Copilot wants to merge 5 commits into
Draft
Refactor WASM REPL into host-driven stdio runtime with streaming interrupts#78Copilot wants to merge 5 commits into
Copilot wants to merge 5 commits into
Conversation
Copilot
AI
changed the title
[WIP] Rework web version to support inference trees and EBNF checker
Add WASM-first web rework architecture proposal with message-passing runtime plan
Jun 6, 2026
Copilot
AI
changed the title
Add WASM-first web rework architecture proposal with message-passing runtime plan
Refactor WASM REPL into host-driven stdio runtime with streaming interrupts
Jun 6, 2026
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.
This change pivots the web/WASM path from browser-specific JSFFI callbacks to a decoupled, host-mediated runtime model. The same
impli.wasmnow runs as a stdio-driven REPL (e.g. in Wasmtime) while the browser frontend acts as an input/output host, including streaming interrupt signaling andread xwait semantics.Runtime contract shift (WASM as decoupled backend)
Host input broker + control messages
Web.hsthat::interrupt/\ETXas out-of-band control messages,read xby waiting on queued input.Asynchronous interrupt plumbing in interpreter semantics
IMP.State(requestInterrupt,consumeInterrupt).Whileexecution in both natural and structural semantics, allowing long-running loops to be interrupted by streamed host control messages.Browser frontend as stdio host
web/src/impli.tsto mediate stdin/stdout/stderr through@runno/wasiinstead of globalimpli.*JSFFI methods.:interrupt, and continued terminal-driven line input handling.Build/docs alignment
stmdependency).stubimport usage.