add example crates

This commit is contained in:
2024-09-29 18:23:50 +02:00
parent da63980914
commit f116e435ec
15 changed files with 782 additions and 3 deletions

11
example-binary/nodejs.js Normal file
View File

@ -0,0 +1,11 @@
async function main() {
const wasm = await import('./target/wasm32-unknown-emscripten/debug/example-binary.js');
const module = {
print: (str) => console.log(str),
printErr: (str) => console.error(str),
}
await wasm.default(module);
}
main();