Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Does anybody know if that kernel module can execute WASM generated from Go or Rust too?


view as:

Unless they’re doing something non-standard, wasm doesn’t care what language it came from.

That said, this claims it relies on emscripten, I think? You can do that with Rust, though it’s not the preferred way. I sure about Go.


From looking at high_level.h it can instantiate any wasm file, but it seems to need the host code specially integrated. There is a function to instantiate the emscripten runtime, probably code can be added to instantiate the go or rust runtimes.

Rust doesn’t have a runtime. Well, at least not in the sense of other languages; it’s comparable to C :)

Emscripten provides a libc; I wondered if it required it. I guess not.


> it’s comparable to C

I think you may want to reassess your definition of what a runtime is ;)

> "crt" stands for "C runtime", and the zero stands for "the very beginning".

[ https://en.wikipedia.org/wiki/Crt0 | https://en.wikipedia.org/wiki/Runtime_library ]

Yup. C definitely has a runtime!


That’s why I said that Rust’s is comparable to C. Both have very, very small ones. Which is what most people mean when they say “no runtime”, since every non-assembly language has some amount of runtime.

Legal | privacy