Commit Graph

74 Commits

Author SHA1 Message Date
Boshen 28d36c69c1 refactor(napi/transform)!: remove the React Compiler option (#23590)
## Summary

Removes React Compiler from the `oxc-transform` napi binding entirely.
It was previously exposed as a `reactCompiler` transform option (added
in #22942, shipped in 0.135.0 / 0.136.0).

**Why not feature-gate it instead?** Gating React Compiler in the
binding can't produce a consistent `index.d.ts`:

- Keep the option types unconditionally → the published `.d.ts`
advertises a `reactCompiler` option that a default (feature-off) build
silently ignores.
- Gate the type surface too → CI's `build-test` (which would enable the
feature) regenerates a `.d.ts` that no longer matches the checked-in
lean one, breaking `git diff --exit-code`.

Removing it from the binding sidesteps both. React Compiler stays
available to the Rust `oxc_transformer` crate behind its own
`react_compiler` feature — only the napi binding loses it.

## Changes

- Drop the `reactCompiler` option and the `ReactCompilerOptions` /
`ReactCompilerGating` / `ReactCompilerDynamicGating` types.
- Remove the `oxc_react_compiler` dependency and stop enabling `oxc`'s
`react_compiler` feature.
- Delete `src/react_compiler.rs` and `test/reactCompiler.test.ts`.
- Regenerate `index.d.ts` (drops the three interfaces + the field;
`index.js` is unchanged — they were type-only).

## Breaking change

`oxc-transform` no longer accepts the `reactCompiler` option. It shipped
in 0.135.0 and 0.136.0.

## Verification

- `cargo check` + `cargo clippy --all-targets`: clean.
- `cargo shear`: no issues; `Cargo.lock` drops only the
`oxc_transform_napi → oxc_react_compiler` edge.
- No remaining `reactCompiler` / `ReactCompilerOptions` references
anywhere else in the repo.
- `pnpm build-test` + `pnpm test`: 53/53 pass (the React Compiler test
is removed).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-18 17:20:55 +08:00
Boshen c782419c3e refactor(transformer): order transform options by evaluation order (#23241)
Reorders the option struct fields in `oxc_transformer` and the napi transform binding to match the order their transforms are evaluated, and documents that order on each struct. Behavior-neutral; the only externally visible change is field order and docs in the generated `index.d.ts`.

- **`TransformOptions`** (`oxc_transformer`): `react_compiler` (separate pass before the traversal) → `typescript` → `decorator` → `plugins` → `jsx` → `env`, with `helper_loader` last (not a transform). Previously `plugins` sat after `env` and `react_compiler` was last despite running first.
- **`EnvOptions`**: was ascending `es2015`→`es2026`; now `module` (consumed by the TypeScript transform), then `es2026` down to `es2015`, then `regexp` last.
- **`ES2020Options`**: `optional_chaining` moved next to `nullish_coalescing_operator`, matching their `enter_expression` order.
- **napi `TransformOptions`**: follows the full compiler pipeline — `lang`/`sourceType` (parse) → `assumptions` → `reactCompiler` → `typescript` → `decorator` → `plugins` → `jsx` → `target` → `helpers` → `inject` → `define` → `sourcemap` (codegen). Two things this surfaced: `inject` runs **before** `define` (the struct listed them reversed), and `sourcemap` is a codegen option so it belongs at the end. `index.d.ts` regenerated.

The canonical order is `TransformerImpl`'s field order in `lib.rs` (and `CompilerInterface::compile` for the napi pipeline stages); a note on `TransformerImpl` now reminds maintainers to keep `TransformOptions` in sync.

Verified: `cargo check`/`clippy --all-features --all-targets` (CI profile), `cargo test -p oxc_transformer`, napi vitest 62/62, transform conformance with zero snapshot diffs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-12 13:33:42 +00:00
Boshen ec266bb733 feat(transformer): run React Compiler as a feature-gated transform pass (#23201)
## Summary

Exposes the React Compiler from `oxc_transformer` behind a Cargo feature so callers no longer need a separate `oxc_react_compiler::transform` + scoping-rebuild step before transforming.

- **`oxc_transformer`**: new `react_compiler` Cargo feature (off by default) + `TransformOptions::react_compiler` field. When set, `Transformer::build_with_scoping` runs the React Compiler first (via a private `run_react_compiler` method), replacing the program and rebuilding scoping for the downstream transforms.
- **Opt-in**: the feature is **not** enabled by `oxc_transformer`'s defaults, nor by `oxc`'s `transformer`/`full` features — enabling the transformer does not pull the heavy `oxc_react_compiler` dependency. It is a separate `react_compiler` feature on `oxc` (which implies `transformer`); the napi transform binding opts in explicitly.
- **Dedupe**: removes the inline React-Compiler orchestration (and the `react_compiler_options()` hook) from `oxc`'s `CompilerInterface` and the napi transform binding; both now drive it through `TransformOptions::react_compiler`.
- **Diagnostics**: the compiler's errors and warnings are merged into `TransformerReturn::errors` (each keeps its severity; downstream filters). `compile()` reports them but no longer aborts codegen — the transformer always leaves a valid program, matching the documented "code may still be available even if there are errors" behaviour.
- **Links**: updates the React Compiler references to the merged upstream location (`react/react/tree/main/compiler`).

## Notes

Transform/codegen output is unchanged when the feature is off (the field defaults to `None` everywhere). The diagnostics behaviour change (no codegen abort) is conformance-safe — the transform-conformance harness keys off reported diagnostics, not printed output.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-10 08:03:07 +00:00
Boshen bb0ed44541 feat(transformer)!: disable styled-components transpileTemplateLiterals by default (#23171)
## Summary

Closes #13398.

The styled-components transform's `transpileTemplateLiterals` option rewrites tagged template literals into the array-call form:

```js
// in
styled.div`width: 100%;`
// out — transpileTemplateLiterals: true
styled.div(["width: 100%;"])
```

This form is only more compact when template literals are *also* down-levelled to ES5 — which is why `babel-plugin-styled-components` enables it by default, to pre-empt Babel's verbose `_taggedTemplateLiteral` output. Oxc does not down-level template literals below ES6, so the array-call form is strictly *larger* than leaving the tagged template untouched.

This PR flips the default to `false`, as agreed with @Dunqing in #13398.

## Changes

- `StyledComponentsOptions::transpile_template_literals` now defaults to `false` (both the `serde` field default and the `Default` impl), with docs explaining why.
- napi: `transpileTemplateLiterals` is documented `@default false` (`transformer.rs` + `index.d.ts`), and the styled-components napi test snapshot now reflects the non-transpiled default output.
- Conformance fixtures that relied on the old default and whose reference output is transpiled now pin `transpileTemplateLiterals: true`, so they keep matching `babel-plugin-styled-components`' reference output. The conformance snapshot is unchanged — `plugin-styled-components` stays at 25/40.

## Breaking change

`transpileTemplateLiterals` now defaults to `false`. Pass `transpileTemplateLiterals: true` to restore the previous behavior.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-06-10 03:26:40 +00:00
Boshen b846ab2d9a feat(react_compiler): integrate the Rust port of the React Compiler (#22942)
Closes https://github.com/oxc-project/oxc/issues/10048

Integrates the Rust port of the React Compiler ([facebook/react#36173](https://github.com/facebook/react/pull/36173)) into oxc.

## Notes (resolved)

- Published crates can't reference Git URLs, so using this from Rolldown needs the React Compiler crates on crates.io. ✅ Published as a fork at https://crates.io/crates/forked_react_compiler; this PR depends on those `forked_react_compiler*` crates so people can get earlier access.
- The React Compiler crates had no license field. ✅ The published fork carries `license = "MIT"` (per the React repo's MIT license), so Cargo Deny and Security Analysis pass.

## Benchmark

**Wall-clock overhead vs plain transform** (release `transformSync`, same `jsx: automatic`, toggling only `reactCompiler`):

| fixture | without | with | overhead |
| --- | --- | --- | --- |
| RadixUIAdoptionSection.jsx (2.5 KiB) | 0.03 ms | 1.81 ms | +1.8 ms |
| excalidraw `App.tsx` (406 KiB) | 4.09 ms | 14.49 ms | +10.4 ms (3.5×) |

So roughly a fixed ~1.8 ms floor per file plus a per-size cost — about **3.5× the transform time** on a large real-world component.

## Binary size

Linking the React Compiler pulls the whole compiler pipeline (HIR, lowering, inference, SSA, optimization, reactive scopes, validation) plus the oxc⇄Babel AST conversion into the binding. Release build of the napi transform addon (`transform.darwin-arm64.node`, `--release`, stripped), darwin-arm64:

| build | size |
| --- | --- |
| baseline (`main`) | 3.51 MiB |
| with React Compiler | 8.66 MiB |
| **delta** | **+5.14 MiB (+146%, 2.46×)** |
2026-06-08 13:32:56 +00:00
Kyle Cannon ee659b6785 feat(transformer/legacy-decorator): add strictNullChecks option for nullable-union design:type (#22266)
## Summary

Adds a `strictNullChecks` field to `DecoratorOptions` (default `true`)
that
controls whether `null` and `undefined` are elided from union
`design:type`
metadata. The default preserves tsc strict semantics (`T | null` →
`Object`);
setting `strictNullChecks: false` matches
babel-plugin-transform-typescript-metadata
and tsc with `--strictNullChecks=false`, emitting the underlying
primitive
(`T | null` → `String` when `T = string`).

Originally this PR unconditionally elided null/undefined. Per @Dunqing's
review, it's now opt-in so the default-strict behaviour is preserved.

## Motivation

When `strictNullChecks` is off, tsc emits the constructor of the
underlying
primitive. babel-plugin-transform-typescript-metadata always elides null
and
undefined regardless of tsconfig. Downstream consumers (NestJS Swagger,
class-validator, TypeORM, AutoMapper) treat `Object` as "no metadata"
and
silently drop fields, so users with `strictNullChecks: false` (common in
older codebases) get worse behaviour under OXC than under tsc/babel.

## Implementation

```rust
pub struct DecoratorOptions {
    pub legacy: bool,
    pub emit_decorator_metadata: bool,
    #[serde(default = "default_as_true")]
    pub strict_null_checks: bool, // default true
}
```

Threaded through `Decorator::new(options) →
LegacyDecorator::new(&options) →
LegacyDecoratorMetadata::new(&options)` (matching the established
`TypeScript::new(&TypeScriptOptions)` precedent), and gated in
`serialize_union_or_intersection_constituents`:

```rust
TSType::TSNullKeyword(_) | TSType::TSUndefinedKeyword(_)
    if !is_intersection && !self.strict_null_checks => continue,
```

Mirrored at the napi binding (`napi/transform/src/transformer.rs`) so
direct
Node consumers can flip it the day this lands. Consumers that wire
tsconfig
(rolldown, bundlers) can forward `compilerOptions.strictNullChecks` to
it.

## Behaviour matrix

| Source | `strictNullChecks: true` (default) | `strictNullChecks:
false` |
|---|---|---|
| `string \| null` | `Object` (matches tsc strict, current behaviour) |
`String` (matches babel, tsc non-strict) |
| `number \| undefined` | `Object` | `Number` |
| `boolean \| null \| undefined` | `Object` | `Boolean` |
| `null \| undefined` | `void 0` | `void 0` |
| `string \| number` | `Object` | `Object` (distinct primitives) |
| `string & null` | `Object` | `Object` (intersection unchanged) |

## Test plan

- [x] 7 unit tests in `tests/integrations/decorator_metadata.rs`
covering
`T | null` under both `strictNullChecks: true` (emits `Object`, current
  behaviour) and `strictNullChecks: false` (emits primitive), plus
`T | undefined`, `T | null | undefined`, the `null | undefined`
void-only
case, the `string | number` distinct-primitive case (still `Object`),
and
  the intersection-with-null regression
- [x] New conformance fixture `oxc/metadata/nullable-union/` with its
own
  `options.json` setting `strictNullChecks: false`
- [x] `cargo test -p oxc_transformer` passes (31 unit + 11 integration)
- [x] `cargo run -p oxc_transform_conformance` shows 0 regressions;
baseline
  fixtures still pass plus the new `nullable-union`
- [x] `cargo fmt -p oxc_transformer -p oxc_transform_napi` and
  `cargo clippy --tests --no-deps` clean

AI assistance was used in writing this patch and tests; the contributor
has
reviewed and tested locally.

---------

Co-authored-by: Dunqing <dengqing0821@gmail.com>
2026-05-25 13:42:41 +08:00
Dunqing f5deb55ea6 feat(napi/transform): expose optimizeConstEnums and optimizeEnums options (#21388)
Surface the TypeScript transformer's `optimize_const_enums` and
`optimize_enums` options through the napi bindings so JavaScript
consumers can opt into const enum inlining and regular (non-const)
enum inlining. Previously both were hardcoded to `false` in the
`From<TypeScriptOptions>` conversion, making them unreachable from JS.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-15 03:22:14 +00:00
sapphi-red 3d01fa1219 docs(transformer): update links to use Oxc docs (#18722)
Updated the links to Oxc docs instead of babel and esbuild.
2026-02-01 15:21:18 +00:00
sapphi-red ba832b8680 refactor(napi/transform)!: remove useBuiltIns / useSpread options (#18432)
These options does not change the behavior so I think it's better not to expose these to users.
https://github.com/oxc-project/oxc/blob/671c2fc96d767eed91e19c3cec0986394d75c282/crates/oxc_transformer/src/jsx/options.rs#L96-L104
2026-01-23 05:42:53 +00:00
overlookmotel 6e8fa809f5 feat(napi/parser, napi/transform): accept sourceType: "commonjs" (#18197)
#18089 added support in parser for `commonjs` source type.

Extend this support to the NAPI packages - accept `sourceType: 'commonjs'` in options for `oxc-parser` and `oxc-transform`.
2026-01-19 04:39:04 +00:00
overlookmotel 083fea9fa6 feat(napi/parser)!: represent empty optional fields on JS side as null (#16411)
Follow-on after #16383 and #16403.

While working on those I discovered an option NAPI-RS has to represent `Option::None` as `null`, instead of omitting the field entirely.

Use that option on the structs used for transferring errors and module record over to JS.

I think this is likely more performant because:

1. NAPI-RS can create all properties of the objects using only the faster `node_api_create_object_with_properties` API.
2. It produces consistent object shapes, so JS engine can better optimize code using these objects.

It also brings the shape of the data perfectly into line between standard transfer and raw transfer, and is consistent with how empty fields in the AST are represented as `null`.

I would have used this option before if I'd known it existed.

### Breaking change

I've marked this as a breaking change because code consuming these objects would now need to check for empty fields with `value === null` instead of `value === undefined`.

However in practice, most people probably use `!value` or `value ?? ...`, so it's unlikely to affect many users. This only affects module record and errors anyway, not the AST itself, as we transfer that as JSON, not via NAPI.
2025-12-02 23:30:56 +00:00
Dunqing 1b18457e05 feat(transformer): support tagged template expression with </script transformation (#15664)
Implement a transformation plugin for tagged template expressions containing </script> tags to prevent script tag issues in browser environments.

  This plugin transforms tagged template literals containing `</script` (case-insensitive) to use a helper function call with template caching, matching esbuild's behavior.

 ### Example

  Transforms tagged templates to use cached template objects with a helper function:

  Input:
```js
foo`</script>`
bar`<script>${content}</script>`
```
  Output:
```js
var _templateObject, _templateObject2;
foo(_templateObject || (_templateObject = babelHelpers.taggedTemplateLiteral(["<\/script>"])));
bar(_templateObject2 || (_templateObject2 = babelHelpers.taggedTemplateLiteral(["<script>", "<\/script>"])), content);
```

 Closes #15306
2025-11-17 11:55:13 +00:00
Boshen ea51b0b5c8 feat(napi)!: standardize function naming with sync suffixes (#15661)
closes #15576

## Summary

Standardizes function naming across all NAPI packages (parser, transform, minify) with a consistent pattern:
- Async functions: `verb` (no suffix)
- Sync functions: `verbSync` (with Sync suffix)

## Changes

### Breaking Changes

**napi/parser:**
- `parseAsync` → `parse` (async)
- `parseSync` remains unchanged (sync)

**napi/transform:**
- `transformAsync` → `transform` (async)
- `transform` → `transformSync` (sync)
- `isolatedDeclaration` → `isolatedDeclarationSync` (sync)
- Added new `isolatedDeclaration` function (async)
- `moduleRunnerTransform` → `moduleRunnerTransformSync` (sync)
- Added new `moduleRunnerTransform` function (async)

**napi/minify:**
- `minify` → `minifySync` (sync)
- Added new `minify` function (async)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2025-11-13 12:28:23 +00:00
sapphi-red 4b904b1584 docs(transformer): clarify jsx.pure option would affect JSX elements (#15376)
Update the doc comment as `jsx.pure` option also affects JSX elements.
https://github.com/oxc-project/oxc/blob/b1d3e005def3fe1899e77d2ace0c0584c9b22f80/crates/oxc_transformer/src/jsx/jsx_impl.rs#L779

I'll update the docs after this PR is merged.
2025-11-07 02:33:23 +00:00
Boshen 70c402b9f9 feat(napi/transform): add async transform function (#13881)
## Summary

This PR adds an async transform function to the NAPI transform package, following the same pattern used in the parser package for consistency.

Closes #10900

## Changes

- Added `transformAsync` function that returns a Promise
- Implemented `TransformTask` struct with `napi::Task` trait
- Reuses existing transform logic from the synchronous version
- Added comprehensive tests to verify async behavior

## Test Plan

Added tests in `test/transform.test.ts` that verify:
- Async function works correctly
- Produces identical results to sync version
- Properly handles errors

All existing tests continue to pass.

🤖 Generated with [Claude Code](https://claude.ai/code)
2025-09-18 12:44:53 +00:00
renovate 1ed8c1a471 chore(deps): update dependency rust to v1.89.0 (#12873)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [rust](https://redirect.github.com/rust-lang/rust) | minor | `1.88.0` -> `1.89.0` |

---

### Release Notes

<details>
<summary>rust-lang/rust (rust)</summary>

### [`v1.89.0`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1890-2025-08-07)

[Compare Source](https://redirect.github.com/rust-lang/rust/compare/1.88.0...1.89.0)

\==========================

<a id="1.89.0-Language"></a>

## Language

- [Stabilize explicitly inferred const arguments (`feature(generic_arg_infer)`)](https://redirect.github.com/rust-lang/rust/pull/141610)
- [Add a warn-by-default `mismatched_lifetime_syntaxes` lint.](https://redirect.github.com/rust-lang/rust/pull/138677)
  This lint detects when the same lifetime is referred to by different syntax categories between function arguments and return values, which can be confusing to read, especially in unsafe code.
  This lint supersedes the warn-by-default `elided_named_lifetimes` lint.
- [Expand `unpredictable_function_pointer_comparisons` to also lint on function pointer comparisons in external macros](https://redirect.github.com/rust-lang/rust/pull/134536)
- [Make the `dangerous_implicit_autorefs` lint deny-by-default](https://redirect.github.com/rust-lang/rust/pull/141661)
- [Stabilize the avx512 target features](https://redirect.github.com/rust-lang/rust/pull/138940)
- [Stabilize `kl` and `widekl` target features for x86](https://redirect.github.com/rust-lang/rust/pull/140766)
- [Stabilize `sha512`, `sm3` and `sm4` target features for x86](https://redirect.github.com/rust-lang/rust/pull/140767)
- [Stabilize LoongArch target features `f`, `d`, `frecipe`, `lasx`, `lbt`, `lsx`, and `lvz`](https://redirect.github.com/rust-lang/rust/pull/135015)
- [Remove `i128` and `u128` from `improper_ctypes_definitions`](https://redirect.github.com/rust-lang/rust/pull/137306)
- [Stabilize `repr128` (`#[repr(u128)]`, `#[repr(i128)]`)](https://redirect.github.com/rust-lang/rust/pull/138285)
- [Allow `#![doc(test(attr(..)))]` everywhere](https://redirect.github.com/rust-lang/rust/pull/140560)
- [Extend temporary lifetime extension to also go through tuple struct and tuple variant constructors](https://redirect.github.com/rust-lang/rust/pull/140593)
- [`extern "C"` functions on the `wasm32-unknown-unknown` target now have a standards compliant ABI](https://blog.rust-lang.org/2025/04/04/c-abi-changes-for-wasm32-unknown-unknown/)

<a id="1.89.0-Compiler"></a>

## Compiler

- [Default to non-leaf frame pointers on aarch64-linux](https://redirect.github.com/rust-lang/rust/pull/140832)
- [Enable non-leaf frame pointers for Arm64EC Windows](https://redirect.github.com/rust-lang/rust/pull/140862)
- [Set Apple frame pointers by architecture](https://redirect.github.com/rust-lang/rust/pull/141797)

<a id="1.89.0-Platform-Support"></a>

## Platform Support

- [Add new Tier-3 targets `loongarch32-unknown-none` and `loongarch32-unknown-none-softfloat`](https://redirect.github.com/rust-lang/rust/pull/142053)
- [`x86_64-apple-darwin` is in the process of being demoted to Tier 2 with host tools](https://redirect.github.com/rust-lang/rfcs/pull/3841)

Refer to Rust's [platform support page][platform-support-doc]
for more information on Rust's tiered platform support.

[platform-support-doc]: https://doc.rust-lang.org/rustc/platform-support.html

<a id="1.89.0-Libraries"></a>

## Libraries

- [Specify the base path for `file!`](https://redirect.github.com/rust-lang/rust/pull/134442)
- [Allow storing `format_args!()` in a variable](https://redirect.github.com/rust-lang/rust/pull/140748)
- [Add `#[must_use]` to `[T; N]::map`](https://redirect.github.com/rust-lang/rust/pull/140957)
- [Implement `DerefMut` for `Lazy{Cell,Lock}`](https://redirect.github.com/rust-lang/rust/pull/129334)
- [Implement `Default` for `array::IntoIter`](https://redirect.github.com/rust-lang/rust/pull/141574)
- [Implement `Clone` for `slice::ChunkBy`](https://redirect.github.com/rust-lang/rust/pull/138016)
- [Implement `io::Seek` for `io::Take`](https://redirect.github.com/rust-lang/rust/pull/138023)

<a id="1.89.0-Stabilized-APIs"></a>

## Stabilized APIs

- [`NonZero<char>`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html)
- Many intrinsics for x86, not enumerated here
  - [AVX512 intrinsics](https://redirect.github.com/rust-lang/rust/issues/111137)
  - [`SHA512`, `SM3` and `SM4` intrinsics](https://redirect.github.com/rust-lang/rust/issues/126624)
- [`File::lock`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.lock)
- [`File::lock_shared`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.lock_shared)
- [`File::try_lock`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.try_lock)
- [`File::try_lock_shared`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.try_lock_shared)
- [`File::unlock`](https://doc.rust-lang.org/stable/std/fs/struct.File.html#method.unlock)
- [`NonNull::from_ref`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.from_ref)
- [`NonNull::from_mut`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.from_mut)
- [`NonNull::without_provenance`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.without_provenance)
- [`NonNull::with_exposed_provenance`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.with_exposed_provenance)
- [`NonNull::expose_provenance`](https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.expose_provenance)
- [`OsString::leak`](https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.leak)
- [`PathBuf::leak`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.leak)
- [`Result::flatten`](https://doc.rust-lang.org/stable/std/result/enum.Result.html#method.flatten)
- [`std::os::linux::net::TcpStreamExt::quickack`](https://doc.rust-lang.org/stable/std/os/linux/net/trait.TcpStreamExt.html#tymethod.quickack)
- [`std::os::linux::net::TcpStreamExt::set_quickack`](https://doc.rust-lang.org/stable/std/os/linux/net/trait.TcpStreamExt.html#tymethod.set_quickack)

These previously stable APIs are now stable in const contexts:

- [`<[T; N]>::as_mut_slice`](https://doc.rust-lang.org/stable/std/primitive.array.html#method.as_mut_slice)
- [`<[u8]>::eq_ignore_ascii_case`](https://doc.rust-lang.org/stable/std/primitive.slice.html#impl-%5Bu8%5D/method.eq_ignore_ascii_case)
- [`str::eq_ignore_ascii_case`](https://doc.rust-lang.org/stable/std/primitive.str.html#impl-str/method.eq_ignore_ascii_case)

<a id="1.89.0-Cargo"></a>

## Cargo

- [`cargo fix` and `cargo clippy --fix` now default to the same Cargo target selection as other build commands.](https://redirect.github.com/rust-lang/cargo/pull/15192/) Previously it would apply to all targets (like binaries, examples, tests, etc.). The `--edition` flag still applies to all targets.
- [Stabilize doctest-xcompile.](https://redirect.github.com/rust-lang/cargo/pull/15462/) Doctests are now tested when cross-compiling. Just like other tests, it will use the [`runner` setting](https://doc.rust-lang.org/cargo/reference/config.html#targettriplerunner) to run the tests. If you need to disable tests for a target, you can use the [ignore doctest attribute](https://doc.rust-lang.org/rustdoc/write-documentation/documentation-tests.html#ignoring-targets) to specify the targets to ignore.

<a id="1.89.0-Rustdoc"></a>

## Rustdoc

- [On mobile, make the sidebar full width and linewrap](https://redirect.github.com/rust-lang/rust/pull/139831). This makes long section and item names much easier to deal with on mobile.

<a id="1.89.0-Compatibility-Notes"></a>

## Compatibility Notes

- [Make `missing_fragment_specifier` an unconditional error](https://redirect.github.com/rust-lang/rust/pull/128425)
- [Enabling the `neon` target feature on `aarch64-unknown-none-softfloat` causes a warning](https://redirect.github.com/rust-lang/rust/pull/135160) because mixing code with and without that target feature is not properly supported by LLVM
- [Sized Hierarchy: Part I](https://redirect.github.com/rust-lang/rust/pull/137944)
  - Introduces a small breaking change affecting `?Sized` bounds on impls on recursive types which contain associated type projections. It is not expected to affect any existing published crates. Can be fixed by refactoring the involved types or opting into the `sized_hierarchy` unstable feature. See the [FCP report](https://redirect.github.com/rust-lang/rust/pull/137944#issuecomment-2912207485) for a code example.
- The warn-by-default `elided_named_lifetimes` lint is [superseded by the warn-by-default `mismatched_lifetime_syntaxes` lint.](https://redirect.github.com/rust-lang/rust/pull/138677)
- [Error on recursive opaque types earlier in the type checker](https://redirect.github.com/rust-lang/rust/pull/139419)
- [Type inference side effects from requiring element types of array repeat expressions are `Copy` are now only available at the end of type checking](https://redirect.github.com/rust-lang/rust/pull/139635)
- [The deprecated accidentally-stable `std::intrinsics::{copy,copy_nonoverlapping,write_bytes}` are now proper intrinsics](https://redirect.github.com/rust-lang/rust/pull/139916). There are no debug assertions guarding against UB, and they cannot be coerced to function pointers.
- [Remove long-deprecated `std::intrinsics::drop_in_place`](https://redirect.github.com/rust-lang/rust/pull/140151)
- [Make well-formedness predicates no longer coinductive](https://redirect.github.com/rust-lang/rust/pull/140208)
- [Remove hack when checking impl method compatibility](https://redirect.github.com/rust-lang/rust/pull/140557)
- [Remove unnecessary type inference due to built-in trait object impls](https://redirect.github.com/rust-lang/rust/pull/141352)
- [Lint against "stdcall", "fastcall", and "cdecl" on non-x86-32 targets](https://redirect.github.com/rust-lang/rust/pull/141435)
- [Future incompatibility warnings relating to the never type (`!`) are now reported in dependencies](https://redirect.github.com/rust-lang/rust/pull/141937)
- [Ensure `std::ptr::copy_*` intrinsics also perform the static self-init checks](https://redirect.github.com/rust-lang/rust/pull/142575)
- [`extern "C"` functions on the `wasm32-unknown-unknown` target now have a standards compliant ABI](https://blog.rust-lang.org/2025/04/04/c-abi-changes-for-wasm32-unknown-unknown/)

<a id="1.89.0-Internal-Changes"></a>

## Internal Changes

These changes do not affect any public interfaces of Rust, but they represent
significant improvements to the performance or internals of rustc and related
tools.

- [Correctly un-remap compiler sources paths with the `rustc-dev` component](https://redirect.github.com/rust-lang/rust/pull/142377)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS41MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuNTEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->
2025-08-08 09:53:16 +00:00
Dunqing 75ee3a17e5 feat(napi/transform): support enabling StyledComponent plugin (#12155) 2025-07-10 01:57:47 +00:00
Boshen 407429a09c feat(napi/parser,napi/transform): accept lang=dts (#12154) 2025-07-09 09:13:18 +00:00
LongYinan ab0dd29a2b fix(napi): napi build cache problem (#11479) 2025-06-05 12:16:08 +08:00
Boshen 0c2d1c1e80 Revert "chore(napi): upgrade to napi@3.0.0-beta.4" (#11474)
Reverts oxc-project/oxc#11466
2025-06-04 16:03:12 +08:00
LongYinan 81af6b3988 chore(napi): upgrade to napi@3.0.0-beta.4 (#11466)
Regenerate the binding files
2025-06-04 11:49:19 +08:00
Boshen 635aa96219 fix(napi): computed final source type from lang then sourceType (#11060)
closes #10980

Previously final source type was only computed when `lang` is not set.

It is changed to:

* compute source type from `lang`, use filename extension if `lang` is
not set
* reset the computed source type with 'script` or `module` if provided
2025-05-15 21:41:42 +08:00
Dunqing 42ca96a81d feat(transformer, napi/transform): deprecate allowDeclareFields option (#10584)
After the `removeClassFieldsWithoutInitializer` option is supported, `allowDeclareFields` is no longer needed. More detail see https://github.com/oxc-project/oxc/pull/10491#issuecomment-2826008849
2025-04-25 01:30:22 +00:00
Dunqing 73cd730651 docs(transformer): add documentation for CompilerAssumptions::set_public_class_fields (#10582)
The documentation copy from [Babel](https://babeljs.io/docs/assumptions#setpublicclassfields), and added some documentation about `useDefineForClassFields: false` support
2025-04-25 01:30:22 +00:00
Dunqing b8414dbfb9 feat(napi/transform): support enabling removeClassFieldsWithoutInitializer (#10581)
Support passing `removeClassFieldsWithoutInitializer` by `oxc-transform` usage
2025-04-25 01:30:21 +00:00
Boshen 2cedfe4148 feat(napi): add codeframe to napi error (#9893)
closes #8684
2025-03-19 08:41:31 +00:00
Boshen 961b95d834 refactor(napi): move common code to oxc_napi (#9875) 2025-03-18 16:06:53 +00:00
Dunqing ffd485c74c feat(transformer, napi/transform): expose moduleRunnerTransform function (#9532)
Expose a `moduleRunnerTransform` function that `Vite` can directly use it to speed-up ssr transform. In this way, `Vitest` also benefits without having to wait for `rolldown-vite`.
2025-03-04 14:53:51 +00:00
Dunqing 8a5051eea1 feat(napi/transform): support enabling emitDecoratorMetadata (#9190) 2025-02-19 14:04:33 +00:00
Arnaud Barré 8d7ceeeed4 ci(napi/transform): validate napi dts files (#9183)
---------

Co-authored-by: Dunqing <dengqing0821@gmail.com>
2025-02-18 17:14:22 +08:00
Dunqing fef82ffee1 feat(transformer/helper-loader): replace @babel/runtime with @oxc-project/runtime (#9059)
Replace it with our forked package.
2025-02-13 06:14:38 +00:00
Dunqing d6daa7565d feat(napi/transform): support for enabling legacy decorator (#8927) 2025-02-10 11:57:39 +00:00
Boshen aa9d7e47ea build(napi): napi build --no-dts-cache (#8499) 2025-01-15 07:02:29 +00:00
Boshen 4ad695dcfb feat(napi/minify): implement napi (#8478) 2025-01-14 08:55:55 +00:00
Boshen c16a85176d feat(napi/transform): add jsx: 'preserve' option (#7965)
closes #7958
2024-12-17 13:49:51 +00:00
Boshen 18d0ce3c06 fix(napi): rename Error to OxcError to avoid name collision (#7780) 2024-12-11 00:30:07 +08:00
Boshen 2803aec521 feat(napi/transform): return helpers information (#7737)
closes #7599
2024-12-09 14:07:40 +00:00
Boshen c98457db5c feat(napi/transformer): add runtime helper mode (#7727)
part of #7599
2024-12-08 15:29:55 +00:00
Boshen 85eec3c82e feat(napi/transform,napi/parser): return structured error object (#7724)
closes #7261
2024-12-08 14:11:56 +00:00
翠 / green 58643529d1 feat(napi/transform): add TransformerOptions::assumptions (#7601)
so that I can use `setPublicClassFields` for #6735 when it's ready.
2024-12-03 17:25:18 +08:00
renovate 47ec49f7f6 chore(deps): update dependency rust to v1.82.0 (#6649)
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [rust](https://redirect.github.com/rust-lang/rust) | minor | `1.81.0` -> `1.82.0` |

---

### Release Notes

<details>
<summary>rust-lang/rust (rust)</summary>

### [`v1.82.0`](https://redirect.github.com/rust-lang/rust/blob/HEAD/RELEASES.md#Version-1820-2024-10-17)

[Compare Source](https://redirect.github.com/rust-lang/rust/compare/1.81.0...1.82.0)

\==========================

<a id="1.82.0-Language"></a>

## Language

-   [Don't make statement nonterminals match pattern nonterminals](https://redirect.github.com/rust-lang/rust/pull/120221/)
-   [Patterns matching empty types can now be omitted in common cases](https://redirect.github.com/rust-lang/rust/pull/122792)
-   [Enforce supertrait outlives obligations when using trait impls](https://redirect.github.com/rust-lang/rust/pull/124336)
-   [`addr_of(_mut)!` macros and the newly stabilized `&raw (const|mut)` are now safe to use with all static items](https://redirect.github.com/rust-lang/rust/pull/125834)
-   [size_of_val_raw: for length 0 this is safe to call](https://redirect.github.com/rust-lang/rust/pull/126152/)
-   [Reorder trait bound modifiers *after* `for<...>` binder in trait bounds](https://redirect.github.com/rust-lang/rust/pull/127054/)
-   [Stabilize opaque type precise capturing (RFC 3617)](https://redirect.github.com/rust-lang/rust/pull/127672)
-   [Stabilize `&raw const` and `&raw mut` operators (RFC 2582)](https://redirect.github.com/rust-lang/rust/pull/127679)
-   [Stabilize unsafe extern blocks (RFC 3484)](https://redirect.github.com/rust-lang/rust/pull/127921)
-   [Stabilize nested field access in `offset_of!`](https://redirect.github.com/rust-lang/rust/pull/128284)
-   [Do not require `T` to be live when dropping `[T; 0]`](https://redirect.github.com/rust-lang/rust/pull/128438)
-   [Stabilize `const` operands in inline assembly](https://redirect.github.com/rust-lang/rust/pull/128570)
-   [Stabilize floating-point arithmetic in `const fn`](https://redirect.github.com/rust-lang/rust/pull/128596)
-   [Stabilize explicit opt-in to unsafe attributes](https://redirect.github.com/rust-lang/rust/pull/128771)
-   [Document NaN bit patterns guarantees](https://redirect.github.com/rust-lang/rust/pull/129559)

<a id="1.82.0-Compiler"></a>

## Compiler

-   [Promote riscv64gc-unknown-linux-musl to tier 2](https://redirect.github.com/rust-lang/rust/pull/122049)
-   [Promote Mac Catalyst targets `aarch64-apple-ios-macabi` and `x86_64-apple-ios-macabi` to Tier 2, and ship them with rustup](https://redirect.github.com/rust-lang/rust/pull/126450)
-   [Add tier 3 NuttX based targets for RISC-V and ARM](https://redirect.github.com/rust-lang/rust/pull/127755)
-   [Add tier 3 powerpc-unknown-linux-muslspe target](https://redirect.github.com/rust-lang/rust/pull/127905)
-   [Improved diagnostics to explain why a pattern is unreachable](https://redirect.github.com/rust-lang/rust/pull/128034)
-   [The compiler now triggers the unreachable code warning properly for async functions that don't return/are `-> !`](https://redirect.github.com/rust-lang/rust/pull/128443)
-   [Promote `aarch64-apple-darwin` to Tier 1](https://redirect.github.com/rust-lang/rust/pull/128592)
-   [Add Trusty OS target `aarch64-unknown-trusty` and `armv7-unknown-trusty` as tier 3 targets](https://redirect.github.com/rust-lang/rust/pull/129490)
-   [Promote `wasm32-wasip2` to Tier 2.](https://redirect.github.com/rust-lang/rust/pull/126967/)

<a id="1.82.0-Libraries"></a>

## Libraries

-   [Generalize `{Rc,Arc}::make_mut()` to `Path`, `OsStr`, and `CStr`.](https://redirect.github.com/rust-lang/rust/pull/126877)

<a id="1.82.0-Stabilized-APIs"></a>

## Stabilized APIs

-   [`std::thread::Builder::spawn_unchecked`](https://doc.rust-lang.org/stable/std/thread/struct.Builder.html#method.spawn_unchecked)
-   [`std::str::CharIndices::offset`](https://doc.rust-lang.org/nightly/std/str/struct.CharIndices.html#method.offset)
-   [`std::option::Option::is_none_or`](https://doc.rust-lang.org/nightly/std/option/enum.Option.html#method.is_none_or)
-   [`[T]::is_sorted`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted)
-   [`[T]::is_sorted_by`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted_by)
-   [`[T]::is_sorted_by_key`](https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.is_sorted_by_key)
-   [`Iterator::is_sorted`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted)
-   [`Iterator::is_sorted_by`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted_by)
-   [`Iterator::is_sorted_by_key`](https://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.is_sorted_by_key)
-   [`std::future::Ready::into_inner`](https://doc.rust-lang.org/nightly/std/future/struct.Ready.html#method.into_inner)
-   [`std::iter::repeat_n`](https://doc.rust-lang.org/nightly/std/iter/fn.repeat_n.html)
-   [`impl<T: Clone> DoubleEndedIterator for Take<Repeat<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-DoubleEndedIterator-for-Take%3CRepeat%3CT%3E%3E)
-   [`impl<T: Clone> ExactSizeIterator for Take<Repeat<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-ExactSizeIterator-for-Take%3CRepeat%3CT%3E%3E)
-   [`impl<T: Clone> ExactSizeIterator for Take<RepeatWith<T>>`](https://doc.rust-lang.org/nightly/std/iter/struct.Take.html#impl-ExactSizeIterator-for-Take%3CRepeatWith%3CF%3E%3E)
-   [`impl Default for std::collections::binary_heap::Iter`](https://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.Iter.html#impl-Default-for-Iter%3C'\_,+T%3E)
-   [`impl Default for std::collections::btree_map::RangeMut`](https://doc.rust-lang.org/nightly/std/collections/btree_map/struct.RangeMut.html#impl-Default-for-RangeMut%3C'\_,+K,+V%3E)
-   [`impl Default for std::collections::btree_map::ValuesMut`](https://doc.rust-lang.org/nightly/std/collections/btree_map/struct.ValuesMut.html#impl-Default-for-ValuesMut%3C'\_,+K,+V%3E)
-   [`impl Default for std::collections::vec_deque::Iter`](https://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Iter.html#impl-Default-for-Iter%3C'\_,+T%3E)
-   [`impl Default for std::collections::vec_deque::IterMut`](https://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.IterMut.html#impl-Default-for-IterMut%3C'\_,+T%3E)
-   [`Rc<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new_uninit)
-   [`Rc<T>::assume_init`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.assume_init)
-   [`Rc<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.new_uninit_slice)
-   [`Rc<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/rc/struct.Rc.html#method.assume_init-1)
-   [`Arc<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.new_uninit)
-   [`Arc<T>::assume_init`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.assume_init)
-   [`Arc<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.new_uninit_slice)
-   [`Arc<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.assume_init-1)
-   [`Box<T>::new_uninit`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.new_uninit)
-   [`Box<T>::assume_init`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.assume_init)
-   [`Box<[T]>::new_uninit_slice`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.new_uninit_slice)
-   [`Box<[MaybeUninit<T>]>::assume_init`](https://doc.rust-lang.org/nightly/std/boxed/struct.Box.html#method.assume_init-1)
-   [`core::arch::x86_64::_bextri_u64`](https://doc.rust-lang.org/stable/core/arch/x86\_64/fn.\_bextri_u64.html)
-   [`core::arch::x86_64::_bextri_u32`](https://doc.rust-lang.org/stable/core/arch/x86\_64/fn.\_bextri_u32.html)
-   [`core::arch::x86::_mm_broadcastsi128_si256`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_broadcastsi128\_si256.html)
-   [`core::arch::x86::_mm256_stream_load_si256`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm256\_stream_load_si256.html)
-   [`core::arch::x86::_tzcnt_u16`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_tzcnt_u16.html)
-   [`core::arch::x86::_mm_extracti_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_extracti_si64.html)
-   [`core::arch::x86::_mm_inserti_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_inserti_si64.html)
-   [`core::arch::x86::_mm_storeu_si16`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_storeu_si16.html)
-   [`core::arch::x86::_mm_storeu_si32`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_storeu_si32.html)
-   [`core::arch::x86::_mm_storeu_si64`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_storeu_si64.html)
-   [`core::arch::x86::_mm_loadu_si16`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_loadu_si16.html)
-   [`core::arch::x86::_mm_loadu_si32`](https://doc.rust-lang.org/stable/core/arch/x86/fn.\_mm_loadu_si32.html)
-   [`core::arch::wasm32::u8x16_relaxed_swizzle`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u8x16\_relaxed_swizzle.html)
-   [`core::arch::wasm32::i8x16_relaxed_swizzle`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i8x16\_relaxed_swizzle.html)
-   [`core::arch::wasm32::i32x4_relaxed_trunc_f32x4`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_trunc_f32x4.html)
-   [`core::arch::wasm32::u32x4_relaxed_trunc_f32x4`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_trunc_f32x4.html)
-   [`core::arch::wasm32::i32x4_relaxed_trunc_f64x2_zero`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_trunc_f64x2\_zero.html)
-   [`core::arch::wasm32::u32x4_relaxed_trunc_f64x2_zero`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_trunc_f64x2\_zero.html)
-   [`core::arch::wasm32::f32x4_relaxed_madd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_madd.html)
-   [`core::arch::wasm32::f32x4_relaxed_nmadd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_nmadd.html)
-   [`core::arch::wasm32::f64x2_relaxed_madd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_madd.html)
-   [`core::arch::wasm32::f64x2_relaxed_nmadd`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_nmadd.html)
-   [`core::arch::wasm32::i8x16_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i8x16\_relaxed_laneselect.html)
-   [`core::arch::wasm32::u8x16_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u8x16\_relaxed_laneselect.html)
-   [`core::arch::wasm32::i16x8_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8\_relaxed_laneselect.html)
-   [`core::arch::wasm32::u16x8_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8\_relaxed_laneselect.html)
-   [`core::arch::wasm32::i32x4_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_laneselect.html)
-   [`core::arch::wasm32::u32x4_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_laneselect.html)
-   [`core::arch::wasm32::i64x2_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i64x2\_relaxed_laneselect.html)
-   [`core::arch::wasm32::u64x2_relaxed_laneselect`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u64x2\_relaxed_laneselect.html)
-   [`core::arch::wasm32::f32x4_relaxed_min`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_min.html)
-   [`core::arch::wasm32::f32x4_relaxed_max`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f32x4\_relaxed_max.html)
-   [`core::arch::wasm32::f64x2_relaxed_min`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_min.html)
-   [`core::arch::wasm32::f64x2_relaxed_max`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.f64x2\_relaxed_max.html)
-   [`core::arch::wasm32::i16x8_relaxed_q15mulr`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8\_relaxed_q15mulr.html)
-   [`core::arch::wasm32::u16x8_relaxed_q15mulr`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8\_relaxed_q15mulr.html)
-   [`core::arch::wasm32::i16x8_relaxed_dot_i8x16_i7x16`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i16x8\_relaxed_dot_i8x16\_i7x16.html)
-   [`core::arch::wasm32::u16x8_relaxed_dot_i8x16_i7x16`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u16x8\_relaxed_dot_i8x16\_i7x16.html)
-   [`core::arch::wasm32::i32x4_relaxed_dot_i8x16_i7x16_add`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.i32x4\_relaxed_dot_i8x16\_i7x16\_add.html)
-   [`core::arch::wasm32::u32x4_relaxed_dot_i8x16_i7x16_add`](https://doc.rust-lang.org/nightly/core/arch/wasm32/fn.u32x4\_relaxed_dot_i8x16\_i7x16\_add.html)

These APIs are now stable in const contexts:

-   [`std::task::Waker::from_raw`](https://doc.rust-lang.org/nightly/std/task/struct.Waker.html#method.from_raw)
-   [`std::task::Context::from_waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.from_waker)
-   [`std::task::Context::waker`](https://doc.rust-lang.org/nightly/std/task/struct.Context.html#method.waker)
-   [`$integer::from_str_radix`](https://doc.rust-lang.org/nightly/std/primitive.u32.html#method.from_str_radix)
-   [`std::num::ParseIntError::kind`](https://doc.rust-lang.org/nightly/std/num/struct.ParseIntError.html#method.kind)

<a id="1.82.0-Cargo"></a>

## Cargo

-   [feat: Add `info` cargo subcommand](https://redirect.github.com/rust-lang/cargo/pull/14141/)

<a id="1.82.0-Compatibility-Notes"></a>

## Compatibility Notes

-   We now [disallow setting some built-in cfgs via the command-line](https://redirect.github.com/rust-lang/rust/pull/126158) with the newly added [`explicit_builtin_cfgs_in_flags`](https://doc.rust-lang.org/rustc/lints/listing/deny-by-default.html#explicit-builtin-cfgs-in-flags) lint in order to prevent incoherent state, eg. `windows` cfg active but target is Linux based. The appropriate [`rustc` flag](https://doc.rust-lang.org/rustc/command-line-arguments.html) should be used instead.
-   The standard library has a new implementation of `binary_search` which is significantly improves performance ([#&#8203;128254](https://redirect.github.com/rust-lang/rust/pull/128254)). However when a sorted slice has multiple values which compare equal, the new implementation may select a different value among the equal ones than the old implementation.
-   [illumos/Solaris now sets `MSG_NOSIGNAL` when writing to sockets](https://redirect.github.com/rust-lang/rust/pull/128259). This avoids killing the process with SIGPIPE when writing to a closed socket, which matches the existing behavior on other UNIX targets.
-   [Removes a problematic hack that always passed the --whole-archive linker flag for tests, which may cause linker errors for code accidentally relying on it.](https://redirect.github.com/rust-lang/rust/pull/128400)
-   The WebAssembly target features `multivalue` and `reference-types` are now
    both enabled by default. These two features both have subtle changes implied
    for generated WebAssembly binaries. For the `multivalue` feature, WebAssembly
    target support has changed when upgrading to LLVM 19. Support for generating
    functions with multiple returns no longer works and
    `-Ctarget-feature=+multivalue` has a different meaning than it did in LLVM 18
    and prior. There is no longer any supported means to generate a module that has
    a function with multiple returns in WebAssembly from Rust source code. For the
    `reference-types` feature the encoding of immediates in the `call_indirect`, a
    commonly used instruction by the WebAssembly backend, has changed. Validators
    and parsers which don't understand the `reference-types` proposal will no
    longer accept modules produced by LLVM due to this change in encoding of
    immediates. Additionally these features being enabled are encoded in the
    `target_features` custom section and may affect downstream tooling such as
    `wasm-opt` consuming the module. Generating a WebAssembly module that disables
    default features requires `-Zbuild-std` support from Cargo and more information
    can be found at
    [rust-lang/rust#128511](https://redirect.github.com/rust-lang/rust/pull/128511).
-   [Rust now raises unsafety errors for union patterns in parameter-position](https://redirect.github.com/rust-lang/rust/pull/130531)

<a id="1.82.0-Internal-Changes"></a>

## Internal Changes

These changes do not affect any public interfaces of Rust, but they represent
significant improvements to the performance or internals of rustc and related
tools.

-   [Update to LLVM 19](https://redirect.github.com/rust-lang/rust/pull/127513)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/oxc-project/oxc).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC4xMjAuMSIsInVwZGF0ZWRJblZlciI6IjM4LjEyMC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
2024-11-29 05:11:03 +00:00
Boshen 59e7e4674f feat(napi/transform): add TransformOptions::target API (#7426) 2024-11-23 15:46:33 +00:00
Song Gao cf3415b0e4 chore(doc): replace main/master to tag/commit to make the url always accessible (#7298) 2024-11-16 21:00:30 +08:00
Boshen b188b4ad75 fix(transformer): fix typescript globals being recognized as globals (#7100)
closes #7090
2024-11-03 13:00:54 +00:00
Boshen a0ccc26c12 feat(napi/transform): add lang option to change source type (#6309)
part of #6274 and #6156

```
    /// Treat the source text as `js`, `jsx`, `ts`, or `tsx`.
    #[napi(ts_type = "'js' | 'jsx' | 'ts' | 'tsx'")]
    pub lang: Option<String>,
```
2024-10-06 04:53:47 +00:00
Boshen 294da86283 fix(napi/transform): fix index.d.ts 2024-10-03 08:52:10 +08:00
Boshen 099ff3a033 refactor(napi/transform): remove "Binding" from types; fix type error (#6260)
closes #6254
closes #6255
2024-10-03 00:44:07 +00:00
Boshen f98e12c13a feat(napi/transform): add inject plugin (#6250) 2024-10-02 15:15:51 +00:00
Boshen 291891e71a feat(napi/transform): add define option (#6212)
part of #6156
2024-10-01 12:57:29 +00:00
Boshen afc3ccbece feat(napi/transform)!: rename TransformOptions::react to jsx. (#6211) 2024-10-01 10:25:21 +00:00