Skip to content

Instantly share code, notes, and snippets.

@appcypher
Created February 14, 2022 12:11
Show Gist options
  • Save appcypher/8c820b23ef67c063a040786a511c373e to your computer and use it in GitHub Desktop.
Save appcypher/8c820b23ef67c063a040786a511c373e to your computer and use it in GitHub Desktop.
Interop JS / Wasm Call

Calling a JS Function from WebAssembly

from host import js_call

js_call("print", "Hello world!")

Calling a Wasm Function from JS

const { wasmCall } = host;

const value = wasmCall("add", 1, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment