Oxc v0.126.0: Turbopack Magic Comments Land in the Parser, Allocator Breaking Changes

Oxc v0.126.0: Turbopack Magic Comments Land in the Parser, Allocator Breaking Changes

lschvn

What Changed

Oxc's April 16 release β€” crates v0.126.0 β€” is a relatively quiet one in terms of user-facing features but ships meaningful tooling improvements and one unavoidable breaking change.

Turbopack Magic Comments in the Parser

The headline feature is parser support for Turbopack magic comments. These are special comments like /* webpackChunkName */, /* webpackPreload */, and /* resource */ that bundlers use to communicate metadata about dynamic imports and code splitting. Until now, the Oxc parser treated them as plain comments. With this change, they're recognized and preserved semantically, which means tools built on Oxc β€” including Rolldown, the Rust-based successor to Rollup β€” can process webpack-annotated code more accurately.

If you're using Rolldown or any toolchain that wraps Oxc's parser, this should reduce spurious warnings and improve tree-shaking decisions when working with code originally written for webpack.

Allocator Breaking Changes

The more disruptive change is a rename of Box and Vec methods in the allocator crate. This is a breaking change targeting projects that directly depend on Oxc's internal allocator API β€” most users of Oxc through Rolldown or oxlint won't be affected.

The rename aligns the allocator's method naming with updated Rust idioms and removes some historical inconsistencies that accumulated as the crate evolved. If you're maintaining a fork or a deep integration with Oxc internals, budget time to update your method calls after upgrading.

NAPI Transform: Enum Optimization Controls

The NAPI transform β€” used by the Node.js binding for oxc_transform β€” now exposes optimizeConstEnums and optimizeEnums as configurable options. These flags control whether the transformer should inline enum values at compile time, reducing runtime enum lookup overhead. The addition is straightforward but useful for performance-sensitive TypeScript projects that use enums heavily.

Performance: Arena and Lexer

Two commits targeted steady-state performance improvements:

Neither of these are user-visible behavior changes, but they contribute to Oxc's continuing lead in JavaScript parsing and transformation benchmarks.

Bug Fixes

A handful of fixes landed in this release:

FAQ

Does this affect oxlint users?

No. oxlint is built on Oxc's linting infrastructure, not the allocator or parser changes in this release. You should be able to update without any config changes.

What about Rolldown users?

Rolldown benefits from the Turbopack magic comment support and any parser correctness fixes. The allocator breaking change is internal and should not affect Rolldown's public API.

How do I update?

cargo update -p oxc_allocator

And rebuild. If you have a direct dependency on the allocator crate's Box or Vec methods, check the CHANGELOG for the full list of renamed methods.

Is there an oxlint release tied to this?

Yes β€” oxlint v1.60.0 was released on April 13 alongside this cycle's work, bringing oxlint's lint rule coverage up to date with the latest parser changes.

Related articles

More coverage with overlapping topics and tags.

SWC v1.15.26: Rust-Powered JavaScript Compiler Keeps Shipping
SWC

SWC v1.15.26: Rust-Powered JavaScript Compiler Keeps Shipping

The swc-project Rust compiler released v1.15.26 with bug fixes, performance improvements, and continued integration across the Node.js and bundler ecosystem.
Next.js v16.3.0-Canary: Prefetch Controls, Dedup Improvements, and a New Dev Overlay
JavaScript

Next.js v16.3.0-Canary: Prefetch Controls, Dedup Improvements, and a New Dev Overlay

Next.js 16.3.0-canary brings fine-grained prefetch configuration, better deduping for the 'use cache' directive, and a redesigned blocking route dev overlay β€” with sccache now bootstrapped via cargo-binstall.
Vue 3.6 Enters Beta: Vapor Mode Complete, Reactivity Revamped
JavaScript

Vue 3.6 Enters Beta: Vapor Mode Complete, Reactivity Revamped

Vue 3.6 has entered beta with the completion of Vapor Mode β€” a virtual-DOM-free compilation path β€” and a major reactivity system overhaul based on alien-signals, promising significant performance gains.

Comments

Log in Log in to join the conversation.

No comments yet. Be the first to share your thoughts.