Add browser runtime, Emscripten build, and persistent submodule updates - #6
Merged
Conversation
espmaniac
marked this pull request as ready for review
July 12, 2026 12:59
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
os/main.cfor the Emscripten browser targetemscripten_get_now()build-browser.sh.github/workflows/build-browser.ymlos/wasm-rtos.jsandos/wasm-rtos.wasmos/wasm-rtosand nestedwasm3before every buildos/wasm-rtosgitlink back to the current GitHub branch after a successful push-triggered buildSubmodule update
The workflow runs:
This updates the top-level
os/wasm-rtoscheckout and the nestedos/wasm-rtos/wasm3checkout before Emscripten compilation.Persistence on GitHub
After a successful push-triggered build, the workflow stages and persists the top-level gitlink:
Pull-request-triggered runs do not push. This avoids duplicate writes and prevents write failures for forked pull requests.
wasm3is owned by thewasm-rtosrepository. A newer nested checkout is used for the current build, but its gitlink can only become permanent through a commit inwasm-rtositself. The workflow emits a warning when the nested checkout differs from the gitlink recorded bywasm-rtos.Build architecture
The Emscripten build compiles:
os/main.cos/wasm-rtos/os.cos/wasm-rtos/wasm3/sourceIt does not compile
os/wasm-rtos/hal.c, becauseos/main.csupplies the browser HAL implementation.Outputs
The build creates and validates:
os/wasm-rtos.jsos/wasm-rtos.wasmBoth files are uploaded together as the
wasm-rtos-browserworkflow artifact and are not committed by the submodule persistence step.Validation
Workflow run #11 successfully completed recursive submodule update, Emscripten installation, browser runtime compilation, output validation, and artifact upload. The persistence step is intentionally skipped on the pull-request run and executes on the corresponding push run.
Do not merge until the browser API and persistent top-level submodule update behavior are accepted.