Live data from Hacker News

Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

twitter.com

1–10 of 106 posts

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#2
For those wondering, Wasm3 describes itself as "the fastest WebAssembly interpreter". Other webassembly runtimes are JIT based, rather than being interpreters. The project's readme (https://github.com/wasm3/wasm3) talks more about this decision.

For more on the difference, and an explanation of what JIT is, check out this section of the book Crafting Interpreters (https://craftinginterpreters.com/a-map-of-the-territory.html...)

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#3
post #2

For those wondering, Wasm3 describes itself as "the fastest WebAssembly interpreter". Other webassembly runtimes are JIT based, rather than being interpreters. The project's readme ( https://github.com/wasm3/wasm3 ) talks more about this decision. For more on the difference, and an explanation of what JIT is, check out this section of the book Crafting Interpreters ( https://craftinginterpreters.com/a-map-of-the-terr…

> Other webassembly runtimes are JIT based, rather than being interpreters.

Do none of the notable ones do normal compilation?

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#4
post #2

For those wondering, Wasm3 describes itself as "the fastest WebAssembly interpreter". Other webassembly runtimes are JIT based, rather than being interpreters. The project's readme ( https://github.com/wasm3/wasm3 ) talks more about this decision. For more on the difference, and an explanation of what JIT is, check out this section of the book Crafting Interpreters ( https://craftinginterpreters.com/a-map-of-the-terr…

> Other webassembly runtimes are JIT based, rather than being interpreters. Do none of the notable ones do normal compilation?

WAVM and SSVM do normal compilation.

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#6
post #2

For those wondering, Wasm3 describes itself as "the fastest WebAssembly interpreter". Other webassembly runtimes are JIT based, rather than being interpreters. The project's readme ( https://github.com/wasm3/wasm3 ) talks more about this decision. For more on the difference, and an explanation of what JIT is, check out this section of the book Crafting Interpreters ( https://craftinginterpreters.com/a-map-of-the-terr…

> Other webassembly runtimes are JIT based, rather than being interpreters. Do none of the notable ones do normal compilation?

What would the difference be between “JIT” and “normal” compilation for WebAssembly?

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#7

Earlier quoted context omitted.

> Other webassembly runtimes are JIT based, rather than being interpreters. Do none of the notable ones do normal compilation?

What would the difference be between “JIT” and “normal” compilation for WebAssembly?

An AOT compiler would do a one-time translation to a platform-specific binary.

If the environment you run on doesn’t support JIT compilation (iOS for example), AOT compiling WASM is useful.

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#8

Earlier quoted context omitted.

> Other webassembly runtimes are JIT based, rather than being interpreters. Do none of the notable ones do normal compilation?

What would the difference be between “JIT” and “normal” compilation for WebAssembly?

So mostly I'm interested in compilers that compile the entire thing before any execution happens. Technically both AoT and JIT compilers can do that, but 95% of the things associated with "JIT" involve compiling the program one piece at a time.

But even with the broad definition of JIT, one important difference is that AoT compilers don't have to mark pages executable.

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#9
post #5

I feel the need to repost this link: https://www.destroyallsoftware.com/talks/the-birth-and-death...

I'm somewhat curious at what pace WASM will gain "market share" while it's only practical to target it with C, C++, Rust, etc.

Supposedly, there are plans to expand it to where it looks more like a virtual machine and less like ASM. Adding things like garbage collection, direct DOM manipulation, polymorphic inline cache, etc. Things that would make it possible to run a decent scripting language without pulling in some huge runtime.

Or forgetting the scripting languages, just the direct DOM access might make it less tedious to use with compiled languages.

It's sort of a second run at getting "applets" right, but in a cross-language way.

Post reply on HN