Skip to content

Commit

Permalink
bun missing URL.createObjectURL workaround for wasm init (#543)
Browse files Browse the repository at this point in the history
  • Loading branch information
ermalkaleci authored Nov 13, 2023
1 parent 1b1e86b commit ffa92ad
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion executor/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion executor/Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion executor/package.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions executor/scripts/pack-wasm.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -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";
`);
Expand Down
2 changes: 1 addition & 1 deletion packages/chopsticks/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/chopsticks",
"version": "0.9.2-5",
"version": "0.9.2-6",
"author": "Acala Developers <hello@acala.network>",
"license": "Apache-2.0",
"bin": "./chopsticks.cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/chopsticks-core",
"version": "0.9.2-5",
"version": "0.9.2-6",
"author": "Acala Developers <hello@acala.network>",
"license": "Apache-2.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/chopsticks-db",
"version": "0.9.2-5",
"version": "0.9.2-6",
"author": "Acala Developers <hello@acala.network>",
"license": "Apache-2.0",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@acala-network/chopsticks-testing",
"version": "0.9.2-5",
"version": "0.9.2-6",
"author": "Acala Developers <hello@acala.network>",
"license": "Apache-2.0",
"type": "module",
Expand Down

0 comments on commit ffa92ad

Please sign in to comment.