4 ms·
I struggle to understand wasm, though I'm interested. What does this part mean? > Internally, it uses the wasmtime runtime to configure, initialize, and run th
by politelemon 4y ago
I struggle to understand wasm, though I'm interested. What does this part mean?
> Internally, it uses the wasmtime runtime to configure, initialize, and run the Wasm modules.
What is wasmtime? I looked at its page and couldn't figure out what they mean by a wasm runtime. I thought the runtime was in the browser. Wouldn't a user just need to compile and just a binary?
- lbhdc 4y agoIt is a runtime for wasm. Wasm is not executable in the same way an x86 binary is. It needs to run in a vm. Wasmtime is one such vm. In a browser context that vm is v8. https://github.com/bytecodealliance/wasmtime https://github.com/bytecodealliance/wasmtime
- egberts1 4y agoOr for Firefox, SpiderMonkey JIT. V8 is a chrome-specific thingie.
- callahad 4y ago> I thought the runtime was in the browser. It can be both! Like JavaScript, WebAssembly started in the browser but is now moving to the server-side, too. With JavaScript, the most common serverside runtime is Node.js. With WebAssembly, it's Wasmtime. There are alternatives (like Deno or Bun for serverside JavaScript), but Wasmtime is the main one at the moment.
- politelemon 4y agoThanks the NodeJS analogy helps me.
- pdpi 4y agoEasiest comparison is the JVM. You can run Java wherever you have a JVM, be it the browser or the server or a desktop application. WASM is basically the moral equivalent of JVM bytecode, so you need the moral equivalent of the JVM to run it. While all major browsers have wasm support (the wasm "JVM") as part of their javascript stack, there's also standalone wasm runtimes, with wasmtime being one of those.
- encryptluks2 4y agoIt appears to be a language that you compile another language into so that you can get more inception-like while sacrificing performance optimizations of using a native language.