Skip to content

feat: warm Rspack platforms before the first bundle request - #1541

Draft
roryabraham wants to merge 1 commit into
callstack:mainfrom
roryabraham:native-run-platform-warmup
Draft

roryabraham wants to merge 1 commit into
callstack:mainfrom
roryabraham:native-run-platform-warmup

Conversation

@roryabraham

@roryabraham roryabraham commented Dec 5, 2026 •

Copy link
Copy Markdown

Summary

  • Let Rspack activate a configured platform before its first client request. The same watcher and in-memory asset cache serve the eventual client bundle request.
  • Offer local runner integrations a loopback-only warmup request for an existing server, and a way to defer keyboard interactions until after native launch.
  • Leave ordinary startup lazy. Reject --warmup-platform for webpack, which does not use the Rspack platform gate.

Re.Pack issue: #1540
Companion Rock issue: callstackincubator/rock#750
Companion Rock PR: callstackincubator/rock#751

Validation

  • Built the Re.Pack and dev-server workspace packages at current upstream main.
  • Passed Re.Pack type checking, Biome and 93 command tests.
  • Linked the current upstream Rock worktree to the built Re.Pack package and verified that a real server compiled iOS before a bundle request, then compiled Android on the same server via the warmup route and served the resulting bundle. Verified that an unknown platform returned 404.
  • No native simulator or device build was run.

@changeset-bot

changeset-bot Bot commented Dec 5, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 0c22676

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@callstack/repack Minor
@callstack/repack-plugin-expo-modules Minor
@callstack/repack-plugin-nativewind Minor
@callstack/repack-plugin-reanimated Minor
@callstack/repack-dev-server Minor
@callstack/repack-init Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel

vercel Bot commented Dec 5, 2026

Copy link
Copy Markdown

@roryabraham is attempting to deploy a commit to the Callstack Team on Vercel.

A member of the Team first needs to authorize it.

@dannyhw

dannyhw commented Dec 5, 2026

Copy link
Copy Markdown
Collaborator

Haven't read the code yet but in general im on board with this idea

@roryabraham

Copy link
Copy Markdown
Author

this is definitely vibe-coded (sorry!) but I'm generally on board with the idea as well. My understanding is that tight now our rock builds wait for the native build to finish, then starts the repack server, and only when the native app starts and requests the JS bundle does the JS bundle compile.

This change allows us to compile the JS bundle right when the native build starts, so that by the time it finishes the JS is already ready, effectively shaving ~30s off the time between running npm run ios and the dev app being up-and-running.

This branch has not been deployed

No deployments
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.

2 participants