mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-20 08:16:31 +00:00
Test the eventual desired interface
This commit is contained in:
@ -77,8 +77,9 @@ impl Object {
|
||||
|
||||
fn generate_js(&self) -> String {
|
||||
format!("\
|
||||
const xform = (instance) => {{
|
||||
return instance;
|
||||
const xform = (obj) => {{
|
||||
obj.exports = obj.instance.exports;
|
||||
return obj;
|
||||
}};
|
||||
export const instantiate = (bytes, imports) => {{
|
||||
return WebAssembly.instantiate(bytes, imports).then(xform);
|
||||
|
Reference in New Issue
Block a user