wasm

2024-10-29T00:47:38.574499Z

Copying a few message from #clojure-wasm (channel I created without realizing this one exists)...

2024-10-29T00:48:07.484659Z

@clojurians115 Posted the following: Unsession summary: Occurred on Oct 23 from 3:15-3:55pm in the Conference Room. There were perhaps 30-50 people in attendance. I (Joel Martin) proposed the unsession to spur discussion. It was a mostly free form discussion "round table" with no formal presentation. The following was discussed during my intro and subsequent discussion (although not strictly in this order): The WebAssembly Garbage Collection (WasmGC) standard is now enabled by default in most browsers and JS engines (node, deno). This was the major missing capability that prevented Clojure from being ported to Wasm. The WasmGC standard is design to enable languages that require GC such as Java, Go, Dart, Kotlin, etc to natively support the wasm platform and to interoperate with other WasmGC languages. The wasm platform is building momentum and all the languages mentioned above already have implementations targeting WasmGC at various stages of maturity. Wasm seems like it has a chance at becoming a true universal runtime (and avoiding many pitfalls of earlier attempts at this). All other major GC languages seem like they either have or will soon have support for WasmGC. Now seems like the right time to bring Clojure to wasm. We might even be a bit late already. But we should start exploring this now and also give feedback to the standards work to make sure that wasm works well for languages like Clojure too. I would personally love to see full/first class support for wasm (eval, macros, runtime ns/class loading, all popular libraries, etc). However, the path to get there still has many unanswered questions. We will probably need to start with something more like the ClojureScript model. Replacing the ClojureScript JS emitter and porting Clojure's efficient/immutable data structures seems like it might be an early phase 1.

šŸ‘ 3
2024-10-29T00:48:20.141639Z

Reading material / important links: • https://v8.dev/blog/wasm-gc-porting - deep dive into WasmGC • https://github.com/WebAssembly/gc/ - WasmGC standard • https://webassembly.org/features/ - Wasm standards and browser support matrix • https://github.com/google/j2cl - Java to WasmGC compiler • https://github.com/helins/wasm.cljc - early spike at wasm support (not WasmGC) • https://wingolog.org/archives/2022/08/18/just-in-time-code-generation-within-webassembly - dynamically recompiling (JIT) wasm code

2024-10-31T12:41:42.982119Z

I'm personally more interested in the WASM replaces Docker scenario than the WASM replaces JS on the web scenario.

😮 1
Josh 2024-10-31T13:28:22.841279Z

https://docs.flutter.dev/platform-integration/web/wasm so I think this means you could use clojuredart already in WASM, I’m not sure if anyone has ever tried it. cc @baptiste-from-paris and @cgrand

2024-10-31T13:29:40.245479Z

WASM REPL or bust.

Josh 2024-10-31T13:32:30.630839Z

haha possibly soon?

Joel Martin 2024-10-30T16:17:22.981879Z

@rafal.wysocki good finds! Looks like schism stalled out after reference types but before the GC standard (so includes it's own GC). Hoot looks like it's actively developed and will be a primary reference IMO.

Joel Martin 2024-10-31T05:40:08.020219Z

I'm digesting this right now which I think is good intro to how wasmgc types works in practice: https://gitlab.com/spritely/guile-hoot/-/blob/main/design/ABI.md

šŸ‘€ 1
baibhavbista 2024-10-31T06:02:27.245209Z

Related tangentially to Hoot, a blog post written about the challenges of WASM, by one of the people working on the project: https://wingolog.org/archives/2023/11/24/tree-shaking-the-horticulturally-misguided-algorithm

rafalw 2024-10-30T06:44:44.182149Z

I would add: https://spritely.institute/hoot/ https://github.com/google/schism

šŸ‘ 1