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

Do WASM_bindgen created modules support running under Wasmer / Wasmtime?

Open Keithcat1 opened this issue 3 years ago • 1 comments

Summary

It would be nice to compile, say, BROTLI to a WASM module and run it on any language and on any platform supporting WASM, but WASM_bindgen seems limited to the browser unless I am missing something? The generated WASM code appears to import tings from Javascript which aren't available otherwise.

Additional Details

The error messages involve something called 'wbindgen_placeholder'.

Keithcat1 avatar Aug 01 '22 20:08 Keithcat1

No, wasm-bindgen only supports JavaScript hosts.

You might be interested in wit-bindgen, which is a work-in-progress project that does bindings generation similar to wasm-bindgen for multiple languages/hosts. It's not at all stable yet, though.

Liamolucko avatar Aug 02 '22 01:08 Liamolucko