You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running case 2. alone: Error: invalid type: JsValue(Object({"t":"hex","c":"ab"})), expected unit
When running case 3. alone: Error: invalid type: string "ed25519", expected unit
When uncommenting case 1.: all three cases work (?)
Worth mentioning: I see that @deno/wasmbuild uses --target bundler, so I tried to build the package with wasm-pack build --target bundler and check if I observe the same issues with its output. It works without issues, however.
The text was updated successfully, but these errors were encountered:
Found a difference between the output of @deno/wasmbuild build and wasm-pack build --target bundler - the latter one adds this:
wasm.__wbindgen_start();
So, it started to work after modifying the output of @deno/wasmbuild into this:
import * as wasm from "./iroha_crypto_bg.wasm";
export * from "./iroha_crypto_bg.js";
import { __wbg_set_wasm } from "./iroha_crypto_bg.js";
__wbg_set_wasm(wasm);
+ wasm.__wbindgen_start();
Steps to reproduce
crypto-wasm
dir inhyperledger-iroha/iroha-javascript
repowasm-bindgen
to0.2.100
inCargo.toml
(as required by@deno/wasmbuild
)deno run -A jsr:@deno/wasmbuild
, it outputs thelib<
directorytest.ts
file:Expected
Actual
2.
alone:Error: invalid type: JsValue(Object({"t":"hex","c":"ab"})), expected unit
3.
alone:Error: invalid type: string "ed25519", expected unit
1.
: all three cases work (?)Worth mentioning: I see that
@deno/wasmbuild
uses--target bundler
, so I tried to build the package withwasm-pack build --target bundler
and check if I observe the same issues with its output. It works without issues, however.The text was updated successfully, but these errors were encountered: