Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm.__wbindgen_start is not a function #271

Open
mgpai22 opened this issue Feb 2, 2025 · 1 comment
Open

wasm.__wbindgen_start is not a function #271

mgpai22 opened this issue Feb 2, 2025 · 1 comment

Comments

@mgpai22
Copy link

mgpai22 commented Feb 2, 2025

My code

import { Data } from '@spacebudz/lucid';

const Redeemer = Data.Object({
  map: Data.Map(Data.Integer(), Data.Integer()),
});

const mintRedeemer: typeof Redeemer = {
  map: new Map<bigint, bigint>(),
};

console.log(mintRedeemer);

Ran using bun 1.2
@spacebudz/lucid: 0.20.4

error:

1 | import * as wasm from "./lucid_core_bg.wasm";
2 | export * from "./lucid_core_bg.js";
3 | import { __wbg_set_wasm } from "./lucid_core_bg.js";
4 | __wbg_set_wasm(wasm);
5 | wasm.__wbindgen_start();
         ^
TypeError: wasm.__wbindgen_start is not a function. (In 'wasm.__wbindgen_start()', 'wasm.__wbindgen_start' is undefined)
@alessandrokonrad
Copy link
Contributor

Seems like real wasm module imports do not work with bun (yet). The .wasm import is resolved into a path, it should however import a module tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants