Live data from Hacker News

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

twitter.com

71–80 of 106 posts

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

#71

What is the state of the world with wasm at this point? It seems like it's been this huge tease for 10 years now, promising that we'll be able to build web apps in any language. But as far as I'm aware, garbage collection and DOM access is still nonexistent.

Well built in garbage collection is non-existent. You can definitely use languages with GCs, you just need to include the GC in the bundle. You can do DOM access as well, it's just not particularly efficient. Overall I think WebAssembly definitely has some usecases, they're just not as visible as people expected. Sites like Figma or Lichess use WASM but not in a super flashy way.

I'm optimistic dom access will get better soon. Check out https://hacks.mozilla.org/2019/03/fast-bump-allocated-virtua... for example.

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

#72
post #59

Earlier quoted context omitted.

In general I agree with your points, but: > What WASM will never be good at is being used for the whole experience. The Flutter team would disagree. They are leaning on WASM for browser builds of Flutter apps, with the whole app rendering in a canvas. They do accessibility via separately created accessibility trees. The experience far from great at the moment, but give it a few years and I think it will get there. (b…

Unfortunately, Flutter apps still seem to be lagging on the accessibility front. The Flutter web gallery[0] has many examples of beautiful apps, but something as "simple" (on the web) as being able to select text is absent. For some use-cases, this is a nonstarter. (Sadly, not to as many as I'd like! But let's simply not regress , to start.) [0] https://gallery.flutter.dev/

It’s worth keeping in mind that Flutter for web had its 1.0 release a matter of weeks ago. It’s very impressive with what they have done so far but let’s see where it goes. The amount of potential there is truly huge.

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

#73

What is the state of the world with wasm at this point? It seems like it's been this huge tease for 10 years now, promising that we'll be able to build web apps in any language. But as far as I'm aware, garbage collection and DOM access is still nonexistent.

It is stuck in MVP 1.0 capabilities, still years away to reach out the capabilities of Flash/CodeAlchemy and PNaCL in 2021, while tools like Emscripten feel like stone age technology, where you need to mount Lego pieces by yourself.

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

#74
post #42

What is the state of the world with wasm at this point? It seems like it's been this huge tease for 10 years now, promising that we'll be able to build web apps in any language. But as far as I'm aware, garbage collection and DOM access is still nonexistent.

Good question, still a "green" technology but I have had great successes with it for the past 4-5 years in production (ASM.JS before widespread WASM compatibility). "promising that we'll be able to build web apps in any language" is not how I see WASM, nor is it really used in this way outside of transpiling Unity3D/Unreal games (this may be the one area there is an exception). I use it to transpile C++ to WASM libra…

WebAssembly Summit 2021 was this week, and that is definitely not how the people on the frontline are selling it, BBC is even on the process to fully rewrite they iPlayer in C++.

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

#75

Earlier quoted context omitted.

There's no garbage collection in WASM. Why do you think that there is garbage collection in WASM? And WASM has been around since 2017, which is only 4 years, not 10 years... Bitcoin has been around much longer (~12 years), for example.

It's a spec proposal. https://github.com/WebAssembly/gc/blob/master/proposals/gc/O...

Yes, and this is just an extension. Existing WASM compiler front-ends for non-GC languages don't have to necessarily use it. Wasm itself still won't take a performance hit, unless individual devs opt in by using front-ends for GC languages.

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

#76

Earlier quoted context omitted.

There's no garbage collection in WASM. Why do you think that there is garbage collection in WASM? And WASM has been around since 2017, which is only 4 years, not 10 years... Bitcoin has been around much longer (~12 years), for example.

Emscripten hit 1.0.1 around November 2012 (looked it up on GitHub) So if wasm is the spiritual successor to Emscripten's "Compile C to JavaScript and run C in a browser" then it's only 8 years.

I mean, you can keep playing this game and take Microsoft ActiveX or Google NaCl as another spiritual successor. I maintain that WASM has been around for 3 years.

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

#78

What is the state of the world with wasm at this point? It seems like it's been this huge tease for 10 years now, promising that we'll be able to build web apps in any language. But as far as I'm aware, garbage collection and DOM access is still nonexistent.

In my view, the DOM is too cluttered and bloated, difficult to work with if you're a browser. There are a lot of things that should be made deprecated, but it's difficult to decide which things, since big browser are usually rivals (apple, google, microsoft, mozilla...).

Browsers are already pretty complex machines, considering javascript and the DOM and everything that comes along. Expecting all browser to let WASM have access to the DOM is a big demand.

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

#79
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?

wasm2c/WasmBoxC springs to mind:

https://kripken.github.io/blog/wasm/2020/07/27/wasmboxc.html

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

#80

What is the state of the world with wasm at this point? It seems like it's been this huge tease for 10 years now, promising that we'll be able to build web apps in any language. But as far as I'm aware, garbage collection and DOM access is still nonexistent.

> in any language

Is anyone using a language other than C, C++ or Rust to target Wasm? Many other languages seem to have experimental support - but are any of them ready for production, or even making significant progress towards being ready?

Post reply on HN