Skip to content

Implement react-server-dom-rspack#35473

Open
SyMind wants to merge 10 commits intofacebook:mainfrom
SyMind:react-server-dom-rspack
Open

Implement react-server-dom-rspack#35473
SyMind wants to merge 10 commits intofacebook:mainfrom
SyMind:react-server-dom-rspack

Conversation

@SyMind
Copy link

@SyMind SyMind commented Jan 9, 2026

Summary

This adds a new react-server-dom-rspack package, which is an RSC integration for the Parcel bundler. It is mostly copied from the existing webpack/turbopack integrations, with some changes to utilize Rspack runtime APIs for loading and executing bundles/modules.

Differences from react-server-dom-webpack
To better support Rspack's architecture and modern framework requirements, react-server-dom-rspack introduces several key enhancements:

  • Native Manifest Integration: Added the __rspack_rsc_manifest__ compiler variable to provide manifest data directly to the RSC runtime.
  • Runtime Global Callbacks: Introduced setServerCallback and setFindSourceMapURLCallback, enabling frameworks to configure global hooks in the browser environment.
  • Inline Server Action Security: Added setServerActionBoundArgsEncryption, encryptServerActionBoundArgs, and decryptServerActionBoundArgs to handle encryption for closure-captured arguments in inline Server Actions.
  • Framework Interop APIs:
    • loadServerAction: Exposes a standard way to load server actions.
    • createServerEntry: Provides access to CSS and JS entry point information for the upper-level framework.

This package is designed to work with Rspack v2.0+, which introduces built-in support for the RSC Plugin implementation in Rspack (introduced in web-infra-dev/rspack#12012)..

  • Note: Rspack v2.0 is currently in beta. You can verify the release notes here.

I have verified the integration with a working example project:

For testing purposes, I have published a pre-release version (0.0.x) of this package to npm. I am happy to grant access to maintainers if needed for verification.

Note: I've already published a 0.0.x version of this package to npm for testing purposes but happy to add whoever needs access to it as well.

How did you test this change?

@meta-cla
Copy link

meta-cla bot commented Jan 9, 2026

Hi @SyMind!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@meta-cla meta-cla bot added the CLA Signed label Jan 9, 2026
@meta-cla
Copy link

meta-cla bot commented Jan 9, 2026

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

@SyMind SyMind force-pushed the react-server-dom-rspack branch 2 times, most recently from ee86a52 to 8a3ca99 Compare January 20, 2026 02:50
@SyMind SyMind force-pushed the react-server-dom-rspack branch from 0aff295 to 1308431 Compare January 26, 2026 08:34
@SyMind SyMind force-pushed the react-server-dom-rspack branch from 1308431 to 09a271e Compare January 26, 2026 08:43
@SyMind SyMind marked this pull request as ready for review February 3, 2026 11:46
@SyMind
Copy link
Author

SyMind commented Feb 4, 2026

@sebmarkbage hi, would you like to review this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments