Earlier quoted context omitted.
Wasm itself is at the level of assembly, not the level of JavaScript. If you want to compile a GC'd language to wasm, you have to bring your own garbage collector and compile it to wasm as well. That's not a showstopper from wasm's perspective, and several languages have done just that, but porting a GC to a new compilation target can be a bit of work.
Is there a js engine implemented in wasm?
WebAssembly
51–60 of 98 posts
Re: WebAssembly
#52Something that I've been looking for as I try to learn more about WebAssembly is good examples of tasks that, when converted from Javascript to WebAssembly, would be good uses of WebAssembly for performance or memory or other reasons. Does anybody have a link to a blog post or good documentation like that?
The YouTube series “HTTP 203” has a couple of great episodes on WebAssembly. Here’s one I like as it is both accessible and in depth: https://youtu.be/S0NQwttnr1I
Re: WebAssembly
#53On another side, compiling existing C/C++ libraries to wasm is still very painful. I struggled a lot using Emscripten to port FFmpeg to wasm - you have to compile EVERY dependency to wasm (so I ended up re-compiling libopus, libmp3lame, etc.) and the compiler warnings are often super cryptic which made the entire process a complete nightmare. The process really needs a lot of work still.
For anyone that's interested, this is the result from my endeavor: https://github.com/aeroheim/audio-file-decoder
And also check out a great general purpose FFmpeg wasm port here: https://github.com/Kagami/ffmpeg.js
Re: WebAssembly
#54One thing that's really great about wasm is how it enables lots of native libraries to be usable in the browser. Recently I ran into performance issues due to limitations in the WebAudio API and was able to workaround it by compiling FFmpeg to wasm and using it instead. Being able to use FFmpeg in the browser is very powerful and brings a huge suite of encoding/decoding capabilities that browsers currently lack right…
This is a scenario where the Bazel model is a good fit IMHO. Bazel rebuilds all of your dependencies from source. This makes it easy to compile all of your dependencies with an extra flag (eg -fsanitize=address for ASAN) or using a different compiler (eg Emscripten).
While it can be annoying to wait for the world to rebuild every time, this is a use case where it shines.
Re: WebAssembly
#55Can someone educate me why GC based languages aren't supported in wasm ?
They've been working on adding that for a while in the standard. But it's a complex topic, which is why it is taking time. You can of course bundle your own garbage collector and statically compile it into wasm. That's why Go, C#, etc. can target WASM.
Jetbrains is actually working on a compiler backend for wasm in their new IR compiler for Kotlin. Apparently they are planning to not bundle their own GC and will try to rely on the WASM gc when that is ready. I'm not sure how close they are to having a usable release. But I expect early betas might start happening late this year or next year.
Re: WebAssembly
#56Wasm is exciting because not only is it a clean, elegant instruction set that has learned a lot from the design warts of JVM and .NET, it also has formal verification as a first-class design goal. This makes it interesting for high-trust environments outside the web context as well. I made a couple of short explainer videos on it: - design goals and instruction set: https://youtu.be/VOaSaShAYb0 - mechanizing safety p…
Re: WebAssembly
#57Earlier quoted context omitted.
Advertisers would hate that kind of model. They want perfectly targeted and customized ads for each individual viewer. Baking the ads into the content or page itself would be going back about 20 years in their world.
They can bake the ad servers side in the binaries.
Re: WebAssembly
#58Wasm is exciting because not only is it a clean, elegant instruction set that has learned a lot from the design warts of JVM and .NET, it also has formal verification as a first-class design goal. This makes it interesting for high-trust environments outside the web context as well. I made a couple of short explainer videos on it: - design goals and instruction set: https://youtu.be/VOaSaShAYb0 - mechanizing safety p…
How "web-specific" is WebAssembly? This all sounds like an enticing feature set a general-purpose VM for writing desktop and server applications, not just making fancy stuff in a web browser. Is there any chance we'll see something like Node-but-it's-Wasm at some point?
Re: WebAssembly
#59Wasm is exciting because not only is it a clean, elegant instruction set that has learned a lot from the design warts of JVM and .NET, it also has formal verification as a first-class design goal. This makes it interesting for high-trust environments outside the web context as well. I made a couple of short explainer videos on it: - design goals and instruction set: https://youtu.be/VOaSaShAYb0 - mechanizing safety p…
How "web-specific" is WebAssembly? This all sounds like an enticing feature set a general-purpose VM for writing desktop and server applications, not just making fancy stuff in a web browser. Is there any chance we'll see something like Node-but-it's-Wasm at some point?
“...provides access to several operating-system-like features, including files and filesystems, Berkeley sockets, clocks, and random numbers, that we'll be proposing for standardization.
It's designed to be independent of browsers, so it doesn't depend on Web APIs or JS, and isn't limited by the need to be compatible with JS.”
Re: WebAssembly
#60Wasm is exciting because not only is it a clean, elegant instruction set that has learned a lot from the design warts of JVM and .NET, it also has formal verification as a first-class design goal. This makes it interesting for high-trust environments outside the web context as well. I made a couple of short explainer videos on it: - design goals and instruction set: https://youtu.be/VOaSaShAYb0 - mechanizing safety p…
How "web-specific" is WebAssembly? This all sounds like an enticing feature set a general-purpose VM for writing desktop and server applications, not just making fancy stuff in a web browser. Is there any chance we'll see something like Node-but-it's-Wasm at some point?