hi everyone! haven’t been here for a few months. c...
# compose-web
j
hi everyone! haven’t been here for a few months. catching up on a few things. so long ago we had compose DOM vs compose canvas. seems we’ve branded compose DOM to compose-html and compose canvas to compose-web 👌. but compose canvas used to be built with just a js build target, but now it looks like there’s a wasm build target involved. so a few questions: 1. the samples I’m looking at seem to have both a js target AND a wasm target. is there a relationship between the two targets? or are these projects supporting both the old way (a js build) AND the new way (a wasm build).
o
1. Without looking at the samples, the current state is: You can use both, the Js and the Wasm target with Compose Web (Canvas). Since Compose 1.5.0, both targets support the same entry point
CanvasBasedWindow
, which supports resizing (so there is no need for
BrowserViewportWindow
anymore). 2. My crystal ball predicts that Wasm will be the future for most use cases, but for now, you might still want to use the Js target as not all libraries support Wasm yet and Wasm is a moving target. 3. If you are using
CanvasBasedWindow
, Js and Wasm are source-compatible regarding Compose. 4. What you probably mean is a flag enabling the browser's Wasm garbage collector. Safari timing seems to be unclear. @bashor expects Chrome and Firefox to ship stable versions having GC enabled by default in late November: https://x.com/bashorov/status/1706931176579969515
💯 1
j
sweet okay that tracks. sounds like we’ll stick with the js target for now until the safari thing is cleared up.
o
Maybe you could copy questions 2-4 into the above post and delete those in the channel. Makes it easier to follow.
j
welp. i was kind of hoping they’d be answered in their respective threads.
o
In the browser, Slack will barely show that there are different threads. Also, I'd say the questions are pretty closely related.