kyren / gc-arena

Incremental garbage collection from safe Rust
Creative Commons Zero v1.0 Universal
436 stars 36 forks source link

Compiling to WebAssembly #69

Closed erlend-sh closed 5 months ago

erlend-sh commented 1 year ago

Is WASM-support within the longer term scope of this project?

It would make piccolo usable by WASM-scriptable game platforms such as Ambient and Gamercade.

https://github.com/WebAssembly/gc/blob/main/proposals/gc/MVP.md https://github.com/dart-lang/sdk/blob/main/pkg/dart2wasm/README.md

kyren commented 1 year ago

Yes, in fact I'm about to integrate this (vicariously through another project) into something with a working wasm build.

I haven't even gotten to the point of trying it yet, but I would be surprised if it didn't work as is?

kyren commented 1 year ago

Oh.... also I'm very very stupid, this is already used by Ruffle which specifically targets wasm. It definitely already works in wasm, I can't even begin to figure out why that wasn't the first thing out of my mouth.

dragazo commented 1 year ago

Yeah, I've definitely used this in a wasm project before, but that was an older version (the crates.io published version). I think the only change that might be good is adding wasm as a CI target to make sure it never breaks wasm support. Granted, no_std is a pretty strong indicator of wasm support as far as I've seen, and that's already tested in CI.

kyren commented 5 months ago

Closing, since this has been supported since forever.