diff --git a/executor/Cargo.lock b/executor/Cargo.lock index da19bef3..72268450 100644 --- a/executor/Cargo.lock +++ b/executor/Cargo.lock @@ -165,7 +165,7 @@ dependencies = [ [[package]] name = "chopsticks-executor" -version = "0.9.2-5" +version = "0.9.2-6" dependencies = [ "arrayvec 0.7.4", "console_error_panic_hook", diff --git a/executor/Cargo.toml b/executor/Cargo.toml index 4909b9bb..784afed3 100644 --- a/executor/Cargo.toml +++ b/executor/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "chopsticks-executor" -version = "0.9.2-5" +version = "0.9.2-6" description = "Chopsticks executor" repository = "https://github.com/AcalaNetwork/chopsticks" license = "Apache-2.0" diff --git a/executor/package.json b/executor/package.json index 9ddb5ee6..097c5bfe 100644 --- a/executor/package.json +++ b/executor/package.json @@ -1,7 +1,7 @@ { "name": "@acala-network/chopsticks-executor", "description": "Chopsticks executor", - "version": "0.9.2-5", + "version": "0.9.2-6", "license": "Apache-2.0", "type": "module", "repository": { diff --git a/executor/scripts/pack-wasm.cjs b/executor/scripts/pack-wasm.cjs index 5a48c49d..b948f5ea 100755 --- a/executor/scripts/pack-wasm.cjs +++ b/executor/scripts/pack-wasm.cjs @@ -19,9 +19,9 @@ const BYTES = '${base64}'; import { base64Decode, unzlibSync } from '@polkadot/wasm-util'; const WASM_BYTES = unzlibSync(base64Decode(BYTES, new Uint8Array(LEN_IN)), new Uint8Array(LEN_OUT)); -import wasmInit from "./chopsticks_executor.js"; +import wasmInit, { initSync } from "./chopsticks_executor.js"; const blob = new Blob([WASM_BYTES], { type: "application/wasm" }); -export const wasmReady = wasmInit(URL.createObjectURL(blob)); +export const wasmReady = typeof Bun !== undefined ? Promise.resolve(initSync(WASM_BYTES)) : wasmInit(URL.createObjectURL(blob)); export * from "./chopsticks_executor.js"; `); diff --git a/packages/chopsticks/package.json b/packages/chopsticks/package.json index add54db7..7db6a14b 100644 --- a/packages/chopsticks/package.json +++ b/packages/chopsticks/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/chopsticks", - "version": "0.9.2-5", + "version": "0.9.2-6", "author": "Acala Developers ", "license": "Apache-2.0", "bin": "./chopsticks.cjs", diff --git a/packages/core/package.json b/packages/core/package.json index 73b42257..b56d02ef 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/chopsticks-core", - "version": "0.9.2-5", + "version": "0.9.2-6", "author": "Acala Developers ", "license": "Apache-2.0", "type": "module", diff --git a/packages/db/package.json b/packages/db/package.json index e321d9b9..3ac6cdff 100644 --- a/packages/db/package.json +++ b/packages/db/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/chopsticks-db", - "version": "0.9.2-5", + "version": "0.9.2-6", "author": "Acala Developers ", "license": "Apache-2.0", "type": "module", diff --git a/packages/testing/package.json b/packages/testing/package.json index 03353549..ff1e10cf 100644 --- a/packages/testing/package.json +++ b/packages/testing/package.json @@ -1,6 +1,6 @@ { "name": "@acala-network/chopsticks-testing", - "version": "0.9.2-5", + "version": "0.9.2-6", "author": "Acala Developers ", "license": "Apache-2.0", "type": "module",