Skip to content

feat(turbopack): support script bootstraps with shared runtime - #197

Merged
fireairforce merged 1 commit into
utoofrom
zoomdong-shared-runtime-bootstrap
Sep 29, 2026
Merged

fireairforce merged 1 commit into
utoofrom
zoomdong-shared-runtime-bootstrap

Conversation

@fireairforce

Copy link
Copy Markdown
Member

Summary

Consumers that load browser entry scripts directly cannot use the shared production runtime when entry bootstrap parameters are returned only for HTML inlining. Add an opt-in emit_entry_bootstrap builder option that keeps the existing bootstrap script alongside the shared runtime, retaining the runtime as the last chunk-group asset. The option defaults to false, preserving existing consumers.

Export EcmascriptBrowserRuntimeChunk so integrations can include the shared runtime when selecting initial script assets. This is the prerequisite for Utoo's separate shared-runtime configuration change.

Verification

  • Built the changed Turbopack crates through Utoo's native addon with cargo build --locked --profile release-local -p pack-napi --features plugin.
  • Real Chrome checks through Utoo passed for single and multiple entries, dynamic imports, Worker dynamic imports, root/non-root public paths, and generated HTML with blocking/deferred scripts.
  • A real twenty-entry fixture passed in both modes. All entries referenced one shared runtime with no identical-content aliases. Total emitted JavaScript decreased by 210,919 raw bytes and 77,409 bytes of per-file gzip; a single entry's initial load did not become smaller.
  • Turbopack browser formatting, Utoo workspace Clippy, and plugin-feature Clippy passed. Full Next.js integration suites were not run; validation exercised the Rust interface through its Utoo consumer.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-29T02:59:05.751893Z c037804 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@fireairforce
fireairforce merged commit 3ae02a5 into utoo Sep 29, 2026
46 of 58 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant