Hacker News new | ask | show | jobs
by phickey 989 days ago
To run a JavaScript interpreter (spidermonkey, in this case) in Wasm, as well as running that same wasm in a JS engine, you want to look at `jco` https://github.com/bytecodealliance/jco

The component model tooling is getting very close to maturity and will solve many of these problems.

1 comments

That's really useful. This page in particular: https://github.com/bytecodealliance/jco/blob/main/EXAMPLE.md

Being able to run "jco wit cowsay.wasm" to see what interfaces that .wasm file provides solves a problem I've run into a bunch of times in the past.

you should also check out modsurfer[0]

"modsurfer generate -p cowsay.wasm -o mod.yaml"

Especially for non-component core modules that wont have wit definitions

[0]: https://github.com/dylibso/modsurfer