4 ms·
Does anybody know if that kernel module can execute WASM generated from Go or Rust too?
by JepZ 8y ago
Does anybody know if that kernel module can execute WASM generated from Go or Rust too?
- steveklabnik 8y agoUnless 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.
- comesee 8y agoFrom 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.
- steveklabnik 8y agoRust 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.
- lloeki 8y ago> 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/Crt0 | https://en.wikipedia.org/wiki/Runtime_library https://en.wikipedia.org/wiki/Runtime_library ] Yup. C definitely has a runtime!
- steveklabnik 8y agoThat’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.