diff --git a/.cargo/config.toml b/.cargo/config.toml index 84e72904..f7769b63 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,2 +1,7 @@ [target.'cfg(target_family = "wasm")'] -rustflags = ["-C", "target-feature=+atomics,+bulk-memory"] +rustflags = [ + "--cfg", + "tokio_unstable", + "-C", + "target-feature=+atomics,+bulk-memory", +] diff --git a/.github/workflows/test-release.yaml b/.github/workflows/test-release.yaml index 90184ecd..51103808 100644 --- a/.github/workflows/test-release.yaml +++ b/.github/workflows/test-release.yaml @@ -153,7 +153,7 @@ jobs: - name: 'Install dependencies' shell: bash run: | - yarn config set supportedArchitectures.cpu --json '["current", "x64", "x86"]' + yarn config set supportedArchitectures.cpu --json '["current", "x64", "ia32", "wasm32"]' yarn install --mode=skip-build --immutable - name: Check build diff --git a/.yarnrc.yml b/.yarnrc.yml index f3c6c728..16000d00 100644 --- a/.yarnrc.yml +++ b/.yarnrc.yml @@ -1,3 +1,8 @@ nodeLinker: node-modules yarnPath: .yarn/releases/yarn-4.5.3.cjs + +supportedArchitectures: + cpu: + - current + - wasm32 diff --git a/cli/cli.mjs b/cli/cli.mjs index 1c0fd092..19c7d6f6 100755 --- a/cli/cli.mjs +++ b/cli/cli.mjs @@ -5,7 +5,7 @@ import { resolve } from 'path' import { fileURLToPath } from 'url' execSync( - `node --loader ts-node/esm/transpile-only ${resolve( + `node --import @oxc-node/core/register ${resolve( fileURLToPath(import.meta.url), '../src/cli.ts', )} ${process.argv.slice(2).join(' ')}`, diff --git a/cli/esbuild.mjs b/cli/esbuild.mjs index 78657910..65e9e5f8 100644 --- a/cli/esbuild.mjs +++ b/cli/esbuild.mjs @@ -1,9 +1,9 @@ -import * as esbuild from 'esbuild' +import { build} from 'esbuild' import { pull } from 'lodash-es' import packageJson from './package.json' assert { type: 'json' } -await esbuild.build({ +await build({ entryPoints: ['./dist/index.js'], outfile: './dist/index.cjs', bundle: true, diff --git a/cli/src/api/templates/load-wasi-template.ts b/cli/src/api/templates/load-wasi-template.ts index ad62b29f..b387037e 100644 --- a/cli/src/api/templates/load-wasi-template.ts +++ b/cli/src/api/templates/load-wasi-template.ts @@ -15,7 +15,7 @@ const __wasi = new __WASI({ fs: __fs, preopens: { '/': '/', - } + }, })` : ` const __wasi = new __WASI({ @@ -147,11 +147,11 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule return 4 } })(), + reuseWorker: true, wasi: __wasi, onCreateWorker() { const worker = new Worker(__nodePath.join(__dirname, 'wasi-worker.mjs'), { env: process.env, - execArgv: ['--experimental-wasi-unstable-preview1'], }) worker.onmessage = ({ data }) => { __wasmCreateOnMessageForFsProxy(__nodeFs)(data) diff --git a/crates/backend/src/codegen/fn.rs b/crates/backend/src/codegen/fn.rs index 9cd316e1..52adfbe6 100644 --- a/crates/backend/src/codegen/fn.rs +++ b/crates/backend/src/codegen/fn.rs @@ -79,7 +79,7 @@ impl TryToTokens for NapiFn { #(#refs)* - #[cfg(debug_assert)] + #[cfg(debug_assertions)] { for a in &_args_array { assert!(!a.is_null(), "failed to initialize napi ref"); diff --git a/crates/build/src/wasi.rs b/crates/build/src/wasi.rs index 4c44275a..f5d8d7b3 100644 --- a/crates/build/src/wasi.rs +++ b/crates/build/src/wasi.rs @@ -25,4 +25,9 @@ pub fn setup() { println!("cargo:rustc-link-search={setjmp_link_dir}"); println!("cargo:rustc-link-lib=static=setjmp-mt"); } + if let Ok(wasi_sdk_path) = env::var("WASI_SDK_PATH") { + println!( + "cargo:rustc-link-search={wasi_sdk_path}/share/wasi-sysroot/lib/wasm32-wasip1-threads" + ); + } } diff --git a/crates/napi/src/bindgen_runtime/module_register.rs b/crates/napi/src/bindgen_runtime/module_register.rs index 62185f5a..9157d5a1 100644 --- a/crates/napi/src/bindgen_runtime/module_register.rs +++ b/crates/napi/src/bindgen_runtime/module_register.rs @@ -6,12 +6,6 @@ use std::ffi::CStr; use std::mem::MaybeUninit; #[cfg(not(feature = "noop"))] use std::ptr; -#[cfg(all( - not(any(target_os = "macos", target_family = "wasm")), - feature = "napi4", - feature = "tokio_rt" -))] -use std::sync::atomic::AtomicUsize; #[cfg(not(feature = "noop"))] use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::{LazyLock, RwLock}; @@ -411,13 +405,13 @@ pub unsafe extern "C" fn napi_register_module_v1( } } }); + }); - REGISTERED_CLASSES.borrow_mut(|map| { - map.insert( - std::thread::current().id(), - PersistedPerInstanceHashMap::from_hashmap(registered_classes), - ) - }); + REGISTERED_CLASSES.borrow_mut(|map| { + map.insert( + std::thread::current().id(), + PersistedPerInstanceHashMap::from_hashmap(registered_classes), + ) }); #[cfg(feature = "compat-mode")] @@ -430,23 +424,25 @@ pub unsafe extern "C" fn napi_register_module_v1( }) } - #[cfg(all( - not(any(target_os = "macos", target_family = "wasm")), - feature = "napi4", - feature = "tokio_rt" - ))] + #[cfg(all(feature = "napi4", feature = "tokio_rt"))] { crate::tokio_runtime::ensure_runtime(); - static init_counter: AtomicUsize = AtomicUsize::new(0); - let cleanup_hook_payload = - init_counter.fetch_add(1, Ordering::Relaxed) as *mut std::ffi::c_void; - + #[cfg(not(target_family = "wasm"))] unsafe { sys::napi_add_env_cleanup_hook( env, Some(crate::tokio_runtime::drop_runtime), - cleanup_hook_payload, + ptr::null_mut(), + ) + }; + + #[cfg(target_family = "wasm")] + unsafe { + crate::napi_add_env_cleanup_hook( + env, + Some(crate::tokio_runtime::drop_runtime), + ptr::null_mut(), ) }; } diff --git a/crates/napi/src/env.rs b/crates/napi/src/env.rs index 8710738b..edfb8280 100644 --- a/crates/napi/src/env.rs +++ b/crates/napi/src/env.rs @@ -1011,13 +1011,27 @@ impl Env { hook: Box::new(cleanup_fn), }; let hook_ref = Box::leak(Box::new(hook)); - check_status!(unsafe { - sys::napi_add_env_cleanup_hook( - self.0, - Some(cleanup_env::), - hook_ref as *mut CleanupEnvHookData as *mut _, - ) - })?; + #[cfg(not(target_family = "wasm"))] + { + check_status!(unsafe { + sys::napi_add_env_cleanup_hook( + self.0, + Some(cleanup_env::), + (hook_ref as *mut CleanupEnvHookData).cast(), + ) + })?; + } + + #[cfg(target_family = "wasm")] + { + check_status!(unsafe { + crate::napi_add_env_cleanup_hook( + self.0, + Some(cleanup_env::), + (hook_ref as *mut CleanupEnvHookData).cast(), + ) + })?; + } Ok(CleanupEnvHook(hook_ref)) } @@ -1146,8 +1160,7 @@ impl Env { check_status!(unsafe { sys::napi_set_instance_data( self.0, - Box::leak(Box::new((TaggedObject::new(native), finalize_cb))) as *mut (TaggedObject, F) - as *mut c_void, + Box::into_raw(Box::new((TaggedObject::new(native), finalize_cb))).cast(), Some( set_instance_finalize_callback:: as unsafe extern "C" fn( @@ -1156,7 +1169,7 @@ impl Env { finalize_hint: *mut c_void, ), ), - Box::leak(Box::new(hint)) as *mut Hint as *mut c_void, + Box::into_raw(Box::new(hint)).cast(), ) }) } @@ -1377,6 +1390,7 @@ unsafe extern "C" fn drop_buffer( mem::drop(unsafe { Vec::from_raw_parts(finalize_data as *mut u8, length, cap) }); } +#[cfg_attr(target_family = "wasm", allow(unused_variables))] pub(crate) unsafe extern "C" fn raw_finalize( env: sys::napi_env, finalize_data: *mut c_void, diff --git a/crates/napi/src/lib.rs b/crates/napi/src/lib.rs index 19ea3f37..0fa3771e 100644 --- a/crates/napi/src/lib.rs +++ b/crates/napi/src/lib.rs @@ -65,6 +65,16 @@ //! ``` //! +#[cfg(target_family = "wasm")] +#[link(wasm_import_module = "napi")] +extern "C" { + fn napi_add_env_cleanup_hook( + env: sys::napi_env, + fun: Option, + arg: *mut core::ffi::c_void, + ) -> sys::napi_status; +} + #[cfg(feature = "napi8")] mod async_cleanup_hook; #[cfg(feature = "napi8")] diff --git a/crates/napi/src/tokio_runtime.rs b/crates/napi/src/tokio_runtime.rs index 398df3a2..f4c1e759 100644 --- a/crates/napi/src/tokio_runtime.rs +++ b/crates/napi/src/tokio_runtime.rs @@ -11,18 +11,24 @@ use crate::{ }; fn create_runtime() -> Option { - #[cfg(not(target_family = "wasm"))] - { - let runtime = tokio::runtime::Runtime::new().expect("Create tokio runtime failed"); - Some(runtime) - } - #[cfg(target_family = "wasm")] { - tokio::runtime::Builder::new_current_thread() - .enable_all() - .build() - .ok() + Some( + tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .expect("Create tokio runtime failed"), + ) + } + + #[cfg(not(target_family = "wasm"))] + { + Some( + tokio::runtime::Builder::new_multi_thread() + .enable_all() + .build() + .expect("Create tokio runtime failed"), + ) } } @@ -56,14 +62,12 @@ pub fn create_custom_tokio_runtime(rt: Runtime) { USER_DEFINED_RT.get_or_init(move || Mutex::new(Some(rt))); } -#[cfg(not(any(target_os = "macos", target_family = "wasm")))] static RT_REFERENCE_COUNT: std::sync::atomic::AtomicUsize = std::sync::atomic::AtomicUsize::new(0); /// Ensure that the Tokio runtime is initialized. /// In windows the Tokio runtime will be dropped when Node env exits. /// But in Electron renderer process, the Node env will exits and recreate when the window reloads. /// So we need to ensure that the Tokio runtime is initialized when the Node env is created. -#[cfg(not(any(target_os = "macos", target_family = "wasm")))] pub(crate) fn ensure_runtime() { use std::sync::atomic::Ordering; @@ -75,12 +79,13 @@ pub(crate) fn ensure_runtime() { RT_REFERENCE_COUNT.fetch_add(1, Ordering::Relaxed); } -#[cfg(not(any(target_os = "macos", target_family = "wasm")))] pub(crate) unsafe extern "C" fn drop_runtime(_arg: *mut std::ffi::c_void) { use std::sync::atomic::Ordering; if RT_REFERENCE_COUNT.fetch_sub(1, Ordering::AcqRel) == 1 { - RT.write().unwrap().take(); + if let Some(rt) = RT.write().unwrap().take() { + rt.shutdown_background(); + } } } @@ -198,23 +203,23 @@ pub fn execute_tokio_future< }; #[cfg(not(target_family = "wasm"))] - { - let jh = spawn(inner); - spawn(async move { - if let Err(err) = jh.await { - if let Ok(reason) = err.try_into_panic() { - if let Some(s) = reason.downcast_ref::<&str>() { - deferred_for_panic.reject(Error::new(crate::Status::GenericFailure, s)); - } else { - deferred_for_panic.reject(Error::new( - crate::Status::GenericFailure, - "Panic in async function", - )); - } + let jh = spawn(inner); + + #[cfg(not(target_family = "wasm"))] + spawn(async move { + if let Err(err) = jh.await { + if let Ok(reason) = err.try_into_panic() { + if let Some(s) = reason.downcast_ref::<&str>() { + deferred_for_panic.reject(Error::new(crate::Status::GenericFailure, s)); + } else { + deferred_for_panic.reject(Error::new( + crate::Status::GenericFailure, + "Panic in async function", + )); } } - }); - } + } + }); #[cfg(target_family = "wasm")] { diff --git a/examples/binary/tsconfig.json b/examples/binary/tsconfig.json new file mode 100644 index 00000000..4082f16a --- /dev/null +++ b/examples/binary/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../../tsconfig.json" +} diff --git a/examples/napi-compat-mode/__tests__/object.spec.ts b/examples/napi-compat-mode/__tests__/object.spec.ts index e55249b2..508080ce 100644 --- a/examples/napi-compat-mode/__tests__/object.spec.ts +++ b/examples/napi-compat-mode/__tests__/object.spec.ts @@ -6,6 +6,7 @@ test('setProperty', (t) => { const obj = {} const key = 'jsPropertyKey' bindings.testSetProperty(obj, key) + // @ts-expect-error t.snapshot(obj[key]) }) @@ -26,6 +27,7 @@ test('setNamedProperty', (t) => { const [key] = keys t.is(keys.length, 1) t.snapshot(key) + // @ts-expect-error t.is(obj[key], property) }) diff --git a/examples/napi-compat-mode/package.json b/examples/napi-compat-mode/package.json index d83880b3..28d87714 100644 --- a/examples/napi-compat-mode/package.json +++ b/examples/napi-compat-mode/package.json @@ -23,7 +23,7 @@ "__tests__/**/*.spec.ts" ], "environmentVariables": { - "TS_NODE_PROJECT": "../tsconfig.json" + "TS_NODE_PROJECT": "./tsconfig.json" }, "workerThreads": false, "cache": false, diff --git a/examples/napi-compat-mode/tsconfig.json b/examples/napi-compat-mode/tsconfig.json new file mode 100644 index 00000000..c65b0616 --- /dev/null +++ b/examples/napi-compat-mode/tsconfig.json @@ -0,0 +1,16 @@ +{ + "extends": "../../tsconfig.json", + "include": ["."], + "compilerOptions": { + "moduleResolution": "node", + "outDir": "./dist", + "rootDir": ".", + "target": "ESNext", + "module": "CommonJS", + "skipLibCheck": true, + "noEmit": true, + "importHelpers": false, + "noEmitHelpers": false + }, + "exclude": ["dist"] +} diff --git a/examples/napi/__tests__/__snapshots__/typegen.spec.ts.snap b/examples/napi/__tests__/__snapshots__/typegen.spec.ts.snap index 8cc3e873..bb6a3033 100644 Binary files a/examples/napi/__tests__/__snapshots__/typegen.spec.ts.snap and b/examples/napi/__tests__/__snapshots__/typegen.spec.ts.snap differ diff --git a/examples/napi/__tests__/__snapshots__/values.spec.ts.md b/examples/napi/__tests__/__snapshots__/values.spec.ts.md index 60898267..28ff3956 100644 --- a/examples/napi/__tests__/__snapshots__/values.spec.ts.md +++ b/examples/napi/__tests__/__snapshots__/values.spec.ts.md @@ -12,6 +12,7 @@ Generated by [AVA](https://avajs.dev). '@napi-rs/cli', '@napi-rs/triples', '@napi-rs/wasm-runtime', + '@oxc-node/core', '@types/lodash', '@vitest/browser', '@vitest/ui', diff --git a/examples/napi/__tests__/__snapshots__/values.spec.ts.snap b/examples/napi/__tests__/__snapshots__/values.spec.ts.snap index bc12e921..798ccad6 100644 Binary files a/examples/napi/__tests__/__snapshots__/values.spec.ts.snap and b/examples/napi/__tests__/__snapshots__/values.spec.ts.snap differ diff --git a/examples/napi/example.wasi-browser.js b/examples/napi/example.wasi-browser.js index d754e448..fa730957 100644 --- a/examples/napi/example.wasi-browser.js +++ b/examples/napi/example.wasi-browser.js @@ -14,7 +14,7 @@ const __wasi = new __WASI({ fs: __fs, preopens: { '/': '/', - } + }, }) const __emnapiContext = __emnapiGetDefaultContext() diff --git a/examples/napi/example.wasi.cjs b/examples/napi/example.wasi.cjs index 35648da5..8a5e303d 100644 --- a/examples/napi/example.wasi.cjs +++ b/examples/napi/example.wasi.cjs @@ -56,11 +56,11 @@ const { instance: __napiInstance, module: __wasiModule, napiModule: __napiModule return 4 } })(), + reuseWorker: true, wasi: __wasi, onCreateWorker() { const worker = new Worker(__nodePath.join(__dirname, 'wasi-worker.mjs'), { env: process.env, - execArgv: ['--experimental-wasi-unstable-preview1'], }) worker.onmessage = ({ data }) => { __wasmCreateOnMessageForFsProxy(__nodeFs)(data) diff --git a/examples/napi/package.json b/examples/napi/package.json index e014b3f7..2f681da3 100644 --- a/examples/napi/package.json +++ b/examples/napi/package.json @@ -8,7 +8,7 @@ "scripts": { "browser": "vite", "build": "napi-raw build --platform --js index.cjs --dts index.d.cts", - "test": "cross-env TS_NODE_PROJECT=./tsconfig.json node --es-module-specifier-resolution=node --loader ts-node/esm/transpile-only --experimental-wasi-unstable-preview1 ../../node_modules/ava/entrypoints/cli.mjs" + "test": "cross-env TS_NODE_PROJECT=./tsconfig.json node --loader ts-node/esm/transpile-only ../../node_modules/ava/entrypoints/cli.mjs" }, "napi": { "binaryName": "example", @@ -28,6 +28,7 @@ "@napi-rs/cli": "workspace:*", "@napi-rs/triples": "workspace:*", "@napi-rs/wasm-runtime": "workspace:*", + "@oxc-node/core": "^0.0.16", "@types/lodash": "^4.17.10", "@vitest/browser": "^2.1.2", "@vitest/ui": "^2.1.2", diff --git a/examples/napi/src/object.rs b/examples/napi/src/object.rs index 1896e5c4..af0bc228 100644 --- a/examples/napi/src/object.rs +++ b/examples/napi/src/object.rs @@ -174,11 +174,11 @@ pub fn generate_function_and_call_it(env: &Env) -> Result { } #[napi] -fn get_null_byte_property(obj: JsObject) -> Result> { +pub fn get_null_byte_property(obj: JsObject) -> Result> { obj.get::("\0virtual") } #[napi] -fn set_null_byte_property(mut obj: JsObject) -> Result<()> { +pub fn set_null_byte_property(mut obj: JsObject) -> Result<()> { obj.set("\0virtual", "test") } diff --git a/examples/napi/tsconfig.json b/examples/napi/tsconfig.json index 1d513f26..6e7a6daa 100644 --- a/examples/napi/tsconfig.json +++ b/examples/napi/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../tsconfig.json", + "extends": "../../tsconfig.json", "include": ["."], "compilerOptions": { "moduleResolution": "node", @@ -7,7 +7,6 @@ "rootDir": ".", "target": "ESNext", "module": "ESNext", - "skipLibCheck": false, "noEmit": true, "types": ["bun-types"], "importHelpers": false diff --git a/examples/tsconfig.json b/examples/tsconfig.json deleted file mode 100644 index 8989757c..00000000 --- a/examples/tsconfig.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "extends": "../tsconfig.json", - "include": ["."], - "compilerOptions": { - "outDir": "./dist", - "rootDir": ".", - "target": "ES2015" - }, - "exclude": ["dist"] -} diff --git a/memory-testing/tsconfig.json b/memory-testing/tsconfig.json new file mode 100644 index 00000000..3c43903c --- /dev/null +++ b/memory-testing/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "../tsconfig.json" +} diff --git a/package.json b/package.json index 0130d394..fc4396b0 100644 --- a/package.json +++ b/package.json @@ -65,6 +65,7 @@ }, "devDependencies": { "@napi-rs/cli": "workspace:*", + "@oxc-node/core": "^0.0.16", "@taplo/cli": "^0.7.0", "@types/debug": "^4.1.12", "@types/lodash-es": "^4.17.12", diff --git a/tsconfig.json b/tsconfig.json index 664e01ca..e093de87 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,6 +24,11 @@ "outDir": "scripts", "lib": ["ES2022"] }, - "include": ["."], + "include": [], + "references": [ + { "path": "./examples/napi-compat-mode/tsconfig.json" }, + { "path": "./examples/napi/tsconfig.json" }, + { "path": "./cli/tsconfig.json" } + ], "exclude": ["node_modules", "bench", "cli/scripts", "scripts", "target"] } diff --git a/tsconfig.root-lint.json b/tsconfig.root-lint.json deleted file mode 100644 index 9f946838..00000000 --- a/tsconfig.root-lint.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "extends": "./tsconfig.json", - "include": [ - "./ava.config.mjs", - "./triples/index.js", - "./wasm-runtime/*.js", - "./wasm-runtime/*.cjs", - "./memory-testing/*.js", - "./memory-testing/*.mjs", - "./crates/cli/index.js", - "./examples/**/*.js", - "./examples/**/*.mjs", - "./examples/**/*.cjs" - ] -} diff --git a/yarn.lock b/yarn.lock index f7165ca2..136ba8a7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -521,6 +521,7 @@ __metadata: "@napi-rs/cli": "workspace:*" "@napi-rs/triples": "workspace:*" "@napi-rs/wasm-runtime": "workspace:*" + "@oxc-node/core": "npm:^0.0.16" "@types/lodash": "npm:^4.17.10" "@vitest/browser": "npm:^2.1.2" "@vitest/ui": "npm:^2.1.2" @@ -1399,7 +1400,7 @@ __metadata: languageName: node linkType: hard -"@napi-rs/wasm-runtime@npm:^0.2.3, @napi-rs/wasm-runtime@npm:^0.2.4, @napi-rs/wasm-runtime@workspace:*, @napi-rs/wasm-runtime@workspace:wasm-runtime": +"@napi-rs/wasm-runtime@npm:^0.2.3, @napi-rs/wasm-runtime@npm:^0.2.4, @napi-rs/wasm-runtime@npm:^0.2.5, @napi-rs/wasm-runtime@workspace:*, @napi-rs/wasm-runtime@workspace:wasm-runtime": version: 0.0.0-use.local resolution: "@napi-rs/wasm-runtime@workspace:wasm-runtime" dependencies: @@ -2183,6 +2184,177 @@ __metadata: languageName: node linkType: hard +"@oxc-node/core-android-arm-eabi@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-android-arm-eabi@npm:0.0.16" + conditions: os=android & cpu=arm + languageName: node + linkType: hard + +"@oxc-node/core-android-arm64@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-android-arm64@npm:0.0.16" + conditions: os=android & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-node/core-darwin-arm64@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-darwin-arm64@npm:0.0.16" + conditions: os=darwin & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-node/core-darwin-x64@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-darwin-x64@npm:0.0.16" + conditions: os=darwin & cpu=x64 + languageName: node + linkType: hard + +"@oxc-node/core-freebsd-x64@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-freebsd-x64@npm:0.0.16" + conditions: os=freebsd & cpu=x64 + languageName: node + linkType: hard + +"@oxc-node/core-linux-arm-gnueabihf@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-linux-arm-gnueabihf@npm:0.0.16" + conditions: os=linux & cpu=arm + languageName: node + linkType: hard + +"@oxc-node/core-linux-arm64-gnu@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-linux-arm64-gnu@npm:0.0.16" + conditions: os=linux & cpu=arm64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-node/core-linux-arm64-musl@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-linux-arm64-musl@npm:0.0.16" + conditions: os=linux & cpu=arm64 & libc=musl + languageName: node + linkType: hard + +"@oxc-node/core-linux-ppc64-gnu@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-linux-ppc64-gnu@npm:0.0.16" + conditions: os=linux & cpu=ppc64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-node/core-linux-s390x-gnu@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-linux-s390x-gnu@npm:0.0.16" + conditions: os=linux & cpu=s390x & libc=glibc + languageName: node + linkType: hard + +"@oxc-node/core-linux-x64-gnu@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-linux-x64-gnu@npm:0.0.16" + conditions: os=linux & cpu=x64 & libc=glibc + languageName: node + linkType: hard + +"@oxc-node/core-linux-x64-musl@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-linux-x64-musl@npm:0.0.16" + conditions: os=linux & cpu=x64 & libc=musl + languageName: node + linkType: hard + +"@oxc-node/core-wasm32-wasi@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-wasm32-wasi@npm:0.0.16" + dependencies: + "@napi-rs/wasm-runtime": "npm:^0.2.5" + conditions: cpu=wasm32 + languageName: node + linkType: hard + +"@oxc-node/core-win32-arm64-msvc@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-win32-arm64-msvc@npm:0.0.16" + conditions: os=win32 & cpu=arm64 + languageName: node + linkType: hard + +"@oxc-node/core-win32-ia32-msvc@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-win32-ia32-msvc@npm:0.0.16" + conditions: os=win32 & cpu=ia32 + languageName: node + linkType: hard + +"@oxc-node/core-win32-x64-msvc@npm:0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core-win32-x64-msvc@npm:0.0.16" + conditions: os=win32 & cpu=x64 + languageName: node + linkType: hard + +"@oxc-node/core@npm:^0.0.16": + version: 0.0.16 + resolution: "@oxc-node/core@npm:0.0.16" + dependencies: + "@oxc-node/core-android-arm-eabi": "npm:0.0.16" + "@oxc-node/core-android-arm64": "npm:0.0.16" + "@oxc-node/core-darwin-arm64": "npm:0.0.16" + "@oxc-node/core-darwin-x64": "npm:0.0.16" + "@oxc-node/core-freebsd-x64": "npm:0.0.16" + "@oxc-node/core-linux-arm-gnueabihf": "npm:0.0.16" + "@oxc-node/core-linux-arm64-gnu": "npm:0.0.16" + "@oxc-node/core-linux-arm64-musl": "npm:0.0.16" + "@oxc-node/core-linux-ppc64-gnu": "npm:0.0.16" + "@oxc-node/core-linux-s390x-gnu": "npm:0.0.16" + "@oxc-node/core-linux-x64-gnu": "npm:0.0.16" + "@oxc-node/core-linux-x64-musl": "npm:0.0.16" + "@oxc-node/core-wasm32-wasi": "npm:0.0.16" + "@oxc-node/core-win32-arm64-msvc": "npm:0.0.16" + "@oxc-node/core-win32-ia32-msvc": "npm:0.0.16" + "@oxc-node/core-win32-x64-msvc": "npm:0.0.16" + dependenciesMeta: + "@oxc-node/core-android-arm-eabi": + optional: true + "@oxc-node/core-android-arm64": + optional: true + "@oxc-node/core-darwin-arm64": + optional: true + "@oxc-node/core-darwin-x64": + optional: true + "@oxc-node/core-freebsd-x64": + optional: true + "@oxc-node/core-linux-arm-gnueabihf": + optional: true + "@oxc-node/core-linux-arm64-gnu": + optional: true + "@oxc-node/core-linux-arm64-musl": + optional: true + "@oxc-node/core-linux-ppc64-gnu": + optional: true + "@oxc-node/core-linux-s390x-gnu": + optional: true + "@oxc-node/core-linux-x64-gnu": + optional: true + "@oxc-node/core-linux-x64-musl": + optional: true + "@oxc-node/core-wasm32-wasi": + optional: true + "@oxc-node/core-win32-arm64-msvc": + optional: true + "@oxc-node/core-win32-ia32-msvc": + optional: true + "@oxc-node/core-win32-x64-msvc": + optional: true + checksum: 10c0/b986b8f6a89c378b9fe06e3c3a50ee086b42709b5c3057bd3b56ff374407bd44fd1efd6b090f5de13dc3256ff47e77c1cb5717a4a655788b647fbdba7c6ad390 + languageName: node + linkType: hard + "@oxlint/darwin-arm64@npm:0.15.0": version: 0.15.0 resolution: "@oxlint/darwin-arm64@npm:0.15.0" @@ -8801,6 +8973,7 @@ __metadata: resolution: "napi-rs@workspace:." dependencies: "@napi-rs/cli": "workspace:*" + "@oxc-node/core": "npm:^0.0.16" "@taplo/cli": "npm:^0.7.0" "@types/debug": "npm:^4.1.12" "@types/lodash-es": "npm:^4.17.12"