Skip to content

chore: upgrade template to Rspack 2.0 rc.1#75

Merged
SyMind merged 3 commits intomainfrom
v2.0
Apr 10, 2026
Merged

chore: upgrade template to Rspack 2.0 rc.1#75
SyMind merged 3 commits intomainfrom
v2.0

Conversation

@SyMind
Copy link
Copy Markdown
Collaborator

@SyMind SyMind commented Apr 10, 2026

Summary

This PR updates rspack-binding-template to be compatible with Rspack 2.0 (rc.1), including Rust workspace dependency bumps, regenerated binding typings, and Node.js engine requirements aligned with Rspack 2.0.

Key changes

  • Deps/Tooling
    • Rust workspace: edition 2024, deps bumped to =0.100.0-rc.1, napi updated, toolchain refreshed and add rust-src.
    • JS: upgrade to @rspack/core@2.0.0-rc.1; update lockfile accordingly.
  • Runtime compatibility
    • Add engines.node: ">=20.19.0 <21 || >=22.12.0" (root + binding package) and update README note.
    • Update index.js to correctly load @rspack/core when the callable export is default, while preserving named exports via Object.assign.
  • Bindings
    • Regenerate index.d.ts / index.js to match upstream API changes (notably JsSource types, new plugin/tap kinds, JsCoordinator, etc.).
  • Rust plugin
    • Use RawStringSource for banner injection to match updated rspack_sources.

Notes

  • This is a template upgrade; downstream projects should also move to Node 20.19+ / 22.12+ when adopting Rspack 2.0.

@SyMind SyMind enabled auto-merge (squash) April 10, 2026 09:00
@SyMind SyMind disabled auto-merge April 10, 2026 09:00
@SyMind SyMind merged commit 0402205 into main Apr 10, 2026
21 checks passed
@SyMind SyMind deleted the v2.0 branch April 10, 2026 10:32
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