Hacker News new | ask | show | jobs
by diggan 349 days ago
I'm literally building a project right now that executes compiled WASM Components, theoretically written in any language but right now I'm using Rust for both parts (the "runner" and the WASM Components).

But, I did a brief exploration to see how I could compile those WASM Components in any language (including JavaScript), and as far as I can tell, if you could use ComponentizeJS + jco for compiling JavaScript to WASM Components, and if you need to run them in JavaScript too, StarlingMonkey seems to be able to handle that.

I'm not sure about the last part, typesafe bindings would require you to use TypeScript or similar, not just JavaScript. I don't use TypeScript myself so I don't know if the approach above would give you any type safety on the Component-implementation side.