4 ms·
I'm impressed that this finally got built and released; I've been hearing about WASM planning to include GC for several years now, I wasn't sure if it'd ever ac
by DylanSp 3y ago
I'm impressed that this finally got built and released; I've been hearing about WASM planning to include GC for several years now, I wasn't sure if it'd ever actually happen.
I'm curious how much this will help some of the WASM-targeting languages that have issues with large binaries from building their runtime. IIRC, Blazor requires something like 1 MB just for a hello world; I wonder if WasmGC will help with that.
- to11mtm 3y agoIt may take some time for WasmGC to be usable by .NET. Based on the discussions the first version of WasmGC does not have a good way to handle a few .NET specific scenarios, and said scenarios are "post-post-mvp". [0] My concern, of course, is that there is not much incentive for those features to be added if .NET is the only platform that needs them... at that point having a form of 'include' (to where a specific GC version can just be cached and loaded by another WASM assembly) would be more useful, despite the pain it would create. [0] - https://github.com/WebAssembly/gc/issues/77 https://github.com/WebAssembly/gc/issues/77
- DylanSp 3y agoInteresting, thanks for the background. Reading through that GitHub issue helps me understand what other comments on here are talking about with the differences between various GCs making it difficult to have a one-size-fits-all WasmGC.
- AlexErrant 3y ago> Chrome's Wasm team has compiled versions of the Fannkuch benchmark (which allocates data structures as it works) from C, Rust, and Java. The C and Rust binaries could be anywhere from 6.1 K to 9.6 K depending on the various compiler flags, while the Java version is much smaller at only 2.3 K! C and Rust do not include a garbage collector, but they do still bundle malloc/free to manage memory, and the reason Java is smaller here is because it doesn't need to bundle any memory management code at all. https://developer.chrome.com/blog/wasmgc/ https://developer.chrome.com/blog/wasmgc/ For Blazor, it'll only help with the GC - IIRC Blazor has to ship the entire dotnet runtime.
- DylanSp 3y agoI saw that, and it's impressive about Java; I thought it would require a similarly large runtime to .NET. From the blog post, it sounds like they're not shipping a JVM, I guess they're just shipping as little of the JRE as they can get away with? (I'm guessing due to my unfamiliarity with the Java world)
- azakai 3y ago.NET's runtime gives it capabilities like finalizers, JITing, debugging, etc. - it's very comprehensive. J2Wasm (Java on WasmGC) is making do without those for now, and just shipping minimal support for a large/useful subset of the language.
- DylanSp 3y agoGotcha, that makes a lot of sense.