@rspack/binding 1.3.1 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/binding.d.ts +18 -1
  2. package/package.json +15 -14
package/binding.d.ts CHANGED
@@ -1087,11 +1087,12 @@ export interface JsRuntimeModuleArg {
1087
1087
 
1088
1088
  export interface JsRuntimeRequirementInTreeArg {
1089
1089
  chunk: JsChunk
1090
+ allRuntimeRequirements: JsRuntimeGlobals
1090
1091
  runtimeRequirements: JsRuntimeGlobals
1091
1092
  }
1092
1093
 
1093
1094
  export interface JsRuntimeRequirementInTreeResult {
1094
- runtimeRequirements: JsRuntimeGlobals
1095
+ allRuntimeRequirements: JsRuntimeGlobals
1095
1096
  }
1096
1097
 
1097
1098
  export interface JsStatsAsset {
@@ -2510,6 +2511,22 @@ export interface RegisterJsTaps {
2510
2511
  registerRsdoctorPluginAssetsTaps: (stages: Array<number>) => Array<{ function: ((arg: JsRsdoctorAssetPatch) => Promise<boolean | undefined>); stage: number; }>
2511
2512
  }
2512
2513
 
2514
+ /**
2515
+ * Shutdown the tokio runtime manually.
2516
+ *
2517
+ * This is required for the wasm target with `tokio_unstable` cfg.
2518
+ * In the wasm runtime, the `park` threads will hang there until the tokio::Runtime is shutdown.
2519
+ */
2520
+ export declare function shutdownAsyncRuntime(): void
2521
+
2522
+ /**
2523
+ * Start the async runtime manually.
2524
+ *
2525
+ * This is required when the async runtime is shutdown manually.
2526
+ * Usually it's used in test.
2527
+ */
2528
+ export declare function startAsyncRuntime(): void
2529
+
2513
2530
  export interface ThreadsafeNodeFS {
2514
2531
  writeFile: (name: string, content: Buffer) => Promise<void>
2515
2532
  removeFile: (name: string) => Promise<void>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rspack/binding",
3
- "version": "1.3.1",
3
+ "version": "1.3.3",
4
4
  "license": "MIT",
5
5
  "description": "Node binding for rspack",
6
6
  "main": "binding.js",
@@ -17,11 +17,11 @@
17
17
  "bugs": "https://github.com/web-infra-dev/rspack/issues",
18
18
  "repository": "web-infra-dev/rspack",
19
19
  "devDependencies": {
20
- "@napi-rs/cli": "3.0.0-alpha.75",
20
+ "@napi-rs/cli": "3.0.0-alpha.76",
21
21
  "@napi-rs/wasm-runtime": "^0.2.7",
22
- "emnapi": "^1.3.1",
22
+ "emnapi": "^1.4.0",
23
23
  "typescript": "^5.7.3",
24
- "@emnapi/core": "^1.3.1"
24
+ "@emnapi/core": "^1.4.0"
25
25
  },
26
26
  "napi": {
27
27
  "binaryName": "rspack",
@@ -48,22 +48,23 @@
48
48
  }
49
49
  },
50
50
  "optionalDependencies": {
51
- "@rspack/binding-darwin-arm64": "1.3.1",
52
- "@rspack/binding-win32-arm64-msvc": "1.3.1",
53
- "@rspack/binding-win32-ia32-msvc": "1.3.1",
54
- "@rspack/binding-linux-arm64-gnu": "1.3.1",
55
- "@rspack/binding-linux-arm64-musl": "1.3.1",
56
- "@rspack/binding-darwin-x64": "1.3.1",
57
- "@rspack/binding-win32-x64-msvc": "1.3.1",
58
- "@rspack/binding-linux-x64-gnu": "1.3.1",
59
- "@rspack/binding-linux-x64-musl": "1.3.1"
51
+ "@rspack/binding-darwin-arm64": "1.3.3",
52
+ "@rspack/binding-win32-arm64-msvc": "1.3.3",
53
+ "@rspack/binding-linux-arm64-gnu": "1.3.3",
54
+ "@rspack/binding-linux-arm64-musl": "1.3.3",
55
+ "@rspack/binding-win32-ia32-msvc": "1.3.3",
56
+ "@rspack/binding-darwin-x64": "1.3.3",
57
+ "@rspack/binding-linux-x64-musl": "1.3.3",
58
+ "@rspack/binding-linux-x64-gnu": "1.3.3",
59
+ "@rspack/binding-win32-x64-msvc": "1.3.3"
60
60
  },
61
61
  "scripts": {
62
62
  "build:dev": "node scripts/build.js",
63
63
  "build:ci": "node scripts/build.js --profile ci",
64
64
  "build:profiling": "node scripts/build.js --profile profiling",
65
65
  "build:release": "node scripts/build.js --profile release",
66
- "build:wasm": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads node scripts/build.js",
66
+ "build:dev:wasm": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads node scripts/build.js",
67
+ "build:release:wasm": "DISABLE_PLUGIN=1 RUST_TARGET=wasm32-wasip1-threads node scripts/build.js --profile release-wasi",
67
68
  "move-binding": "node scripts/move-binding",
68
69
  "test": "tsc -p tsconfig.type-test.json"
69
70
  }