You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a default_global_allocator feature so embedders can keep their own global allocator #804
oxc-node's Rust crate can be linked into another Node-API addon. Vite+ does this: it compiles oxc-node into its own native binding, next to rolldown_binding, so vpx script.ts can run oxc-node's hooks from the binary it already ships. That binary already has a global allocator, because rolldown_binding declares mimalloc. oxc-node declares one unconditionally (src/lib.rs#L35-L42), and a binary can only have one, so the build fails with rustc's error that the #[global_allocator] conflicts with the global allocator in another crate.
Proposal
Gate the allocator behind a feature, as rolldown_binding does with default_global_allocator:
[features]
# Keep the system allocator, for hosts that declare their own.default_global_allocator = []
Using the same name as Rolldown means an addon that links both enables the same feature on each. The published @oxc-node/core builds keep mimalloc, since the feature is off by default.
Activity
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
17 remaining items
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
docs(vpx): keep `.cts` ESM support and link the oxc-node follow-ups
build(oxc-node): sync the vendored source to v0.1.6
feat(vpx): run TypeScript scripts with the vendored oxc-node (#2936)