Skip to content

feat(compiler): releaseCompilation after close (WRKF-4276) - #1

Draft
flesler wants to merge 1 commit into
mainfrom
wrkf-4276-release-compilation
Draft

flesler wants to merge 1 commit into
mainfrom
wrkf-4276-release-compilation

Conversation

@flesler

@flesler flesler commented Oct 9, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Cherry-pick of upstream draft web-infra-dev/rspack#15860 (issue #15859) onto v2.2.6-webflow.0.

Adds Compiler.releaseCompilation() so embedders can drop the last compilation graph after close() without unloading the native binding.

Linear: WRKF-4276

Single commit for merge. Blocks monorepo follow-up WRKF-4287 until tag v2.2.6-webflow.1.

Changes

  • Rust: release_compilation() on core compiler + NAPI binding
  • JS: Compiler.releaseCompilation() in @rspack/core
  • Test: tests/rspack-test/compilerCases/release-compilation-after-close/

Test plan

  • pnpm run test in tests/rspack-test locally (9375 passed, includes Compiler.test.mjs)
  • Fork CI workflow green on this PR (Linux/Mac/Windows build + tests)
  • After merge: cut v2.2.6-webflow.1 with linux .node from fork release workflow

@linear-code

linear-code Bot commented Oct 9, 2026

Copy link
Copy Markdown

WRKF-4276

Allow long-running Node embedders to drop the last compilation's module
graph and codegen results without unloading the native binding.

Based on web-infra-dev#15860 (issue web-infra-dev#15859).
@flesler
flesler force-pushed the wrkf-4276-release-compilation branch from 7045e6a to 00251a4 Compare October 9, 2026 18:30
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