wasm-bindgen icon indicating copy to clipboard operation
wasm-bindgen copied to clipboard

Directly accessing exports of JS snippets

Open da-x opened this issue 3 years ago • 0 comments

Suppose I have the following:

#[wasm_bindgen(module = "/js/some-rollup.js")]
extern "C" {
// ... various stuff here ...
}

And some-rolleup.js is a JS rollup that ends in the following export:

// ... various JS code here ...
export { SomeType, namespace };

Is there a way to directly obtain a JsValue that represents SomeType or namespace, besides adding dedicated accessory functions in the JS code that return them in addition to the export?

da-x avatar Feb 26 '22 18:02 da-x