News for hackers. Stuff that matters.
Re:Tree-shaking, the horticulturally misguided algorithm by nextaccountic on Saturday April 13, 2024 @11:48AM (#40023890)
Does browsers support wasm with dynamic linking?
Re:Tree-shaking, the horticulturally misguided algorithm by kentonv on Saturday April 13, 2024 @11:49AM (#40023908)
Yes.
Re:Tree-shaking, the horticulturally misguided algorithm by nextaccountic on Saturday April 13, 2024 @11:52AM (#40023925)
Do you happen to know where can I check out the cutoff version for each browser? https://caniuse.com/?search=wasm doesn't have it (or other things like WasmGC for that matter)
Re:Tree-shaking, the horticulturally misguided algorithm by kentonv on Saturday April 13, 2024 @12:07PM (#40024043)
I believe dynamic linking has been a core feature of WebAssembly from the beginning. You have always been able to load multiple Wasm modules in the same isolate and make them call each other.

(But, language toolchains have to actually be designed to use this feature. Most aren't.)

Re:Tree-shaking, the horticulturally misguided algorithm by tomjakubowski on Saturday April 13, 2024 @02:02PM (#40024827)
The way Emscripten does it, IIRC, doesn't require any special browser support. The toolchain generates glue code in JavaScript to support calls between dynamically linked Wasm modules.