Repository navigation
feat(runtime): let a page be opened on the Web global surface - #67
Merged
Merged
Conversation
page_runner_open and page_dispatcher_submit take a trailing `surface: Global_Surface = .Node` and hand it to page_open. A `.Web` page cannot reach process, require, Buffer or the other Node names (#5). The default stays `.Node`, so every existing page is unchanged. bench/pages opens its pages on `.Web` when BENCH_SURFACE=web. No test in this commit: tests are paused for this phase. Co-Authored-By: Claude Fable 5.2 <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.
Stacked on #66; retarget to
masteronce that merges.What changed
page_runner_openandpage_dispatcher_submittake a trailingsurface: Global_Surface = .Nodeand hand it topage_open. A.Webpage cannot reachprocess,require,module,Buffer,global,setImmediateor any__lava*hook (#5). The default stays.Node, so every existing page is unchanged.bench/pagesopens its pages on.WebwhenBENCH_SURFACE=web.Measured
bench/pages,-o:speed, 16-core dev machine, medians of 7 interleaved launches per arm, 1000 pages per launch, before the Node-only modules were taken out of the build:Cold start is about 2 ms lower on
.Web(stdio and the node-streams stack never compile). Warm start is not better, 0.1 ms worse; whether that is the cost of deleting properties from the global object or noise was not separated.Not verified
make checkpasses..Webpage run right after a.Nodepage in the same pooled VM saw none of the Node names and nothing the first page left on its global, and the next.Nodepage had them all back. Dropping the pass-through inpage_runner_openmade that check fail. The test file is not committed..Webdoes not promise is unchanged from feat(runtime): add a Web global surface that hides the Node names lava#502: web APIs still hand out Buffer-backed bytes andERR_*codes.docs/LARVA.mdstage status is not updated.🤖 Generated with Claude Code