Live data from Hacker News

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

twitter.com

81–90 of 106 posts

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

#81
post #72
post #59

Earlier quoted context omitted.

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.

Agree that it's exciting to see, but what's the actual potential? Flutter developing into a latter-day Macromedia Flash?

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

#82
post #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?

There is Blazor, which compiles C# ASP.NET-like code to a client-side application that runs on wasm.

https://en.m.wikipedia.org/wiki/Blazor

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

#83
post #23

Earlier quoted context omitted.

A JIT generally means it compiles parts of the program to machine code on the fly before running them, as needed. To support that, the environment must allow the JIT to write machine code to memory, and then execute that same code. CPUs have memory protection flags to control which memory areas can be written, and which can be executed. The OS is in charge of setting those flags, on request from the application. Eg.…

W^X is not the issue here. JITs can deal with that, and in fact should do so even when it's not OS-enforced for security reasons. The problem on ios specifically is code signing, which is a problem for both JIT and AOT.

"There are indirect methods where a file is written then mapped, like generating a small program or shared library on the fly. But iOS restricts these as well."

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

#84

Earlier quoted context omitted.

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

Some runtimes like wasmtime support AOT compilation artifacts that can be loaded. But in general you can't "just compile" Webassembly, because you need a runtime. There is a C project that can compile an executable that includes the runtime and the compiled WASM, but the name is escaping me right now. Note that JIT in the WASM world doesn't quite mean the same thing as for eg Java. Almost all runtimes compile a whole…

Compiling individual functions was something in Java JITs like 20 years ago, they are a little bit more clever nowadays.

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

#85

Self-hosting (compilers) https://en.wikipedia.org/wiki/Self-hosting_(compilers) : > In computer programming, self-hosting is the use of a program as part of the toolchain or operating system that produces new versions of that same program—for example, a compiler that can compile its own source code

How big of a milestone is self-hosting for a language?

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

#86
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 also seems to be lagging on the literal front, at least on my iPad.

Considering these are just hello world apps, the performance has a long way to go.

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

#87
post #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?

Go also has good support and Java has http://teavm.org/ and JWebAssembly. There is also the general https://wasmer.io/ for using web-assembly in any language. They claim they have good support for other languages like Python and PHP but I personally never tested that.

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

#88
post #42

Earlier quoted context omitted.

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…

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…

The flutter web text field don't even handle multiline text input with IME properly. Cause the whole text field to scroll while select character from IME dropdown. I'd doubt how could that be count as "good user experience".

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

#89

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.

The priorities seem to have shifted, with most standardization efforts being focused on running WebAssembly on the server, rather than web browsers.

Flutter and Blazor are exceptions, but they had to reinvent everything their own way.

Regarding languages, the landscape is pretty much limited to Rust (when using compatible crates), Zig, TinyGo, AssemblyScript and C# (with Blazor).

The specification started with something very simple but keeps getting more and more complicated, not to mention breaking changes, that don’t encourage writing tooling for it. At least not until things settle a little bit.

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

#90

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 probably needs a killer app. To me it feels like it's a solution looking for a problem.

WASM alredy got a killer app: being able to run any snippet of any language in a browser. For teaching programming, it's use, because projects like pyiodine can load a full python vm in a the browser and let the student experiment with the snippet without taking the risk of ruining my server.
Post reply on HN