Closed kud1ing closed 3 years ago
How are you using piet? is it on its own, or through druid or similar?
In druid projects, we don't build any of the web stuff, including piet-web
, unless targeting wasm
; or at least I'm pretty sure this is the case.
Through Druid.
piet-web
is part of piet
's workspace and I don’t see how compilation is disabled in the piet-web
crate. It may not be used but it is compiled - at least this is what cargo told me.
hmm.
My understanding: compiling druid doesn't compile the whole piet workspace. It compiles the piet-common
crate; and this brings in the top-level piet
crate, as well as one of the piet backends. The choice of backend is a function of the target-os.
One weird thing about this is that there is a feature that can cause compilation of the web backend. I don't remember what the rationale for this was? It might have been for testing or CI, or something like that? I'm not totally sure what's going on here, but you're welcome to investigate.
Hm, strange. I can see neither piet-web
nor js_sys
in cargo tree
.
Something must have changed after the cargo update
.
Sorry for the false alarm.
No worries, there's definitely some weirdness around how some of these dependencies are declared, and I don't myself fully understand it all. 🤷
Background: i had a GUI app in a workspace where
js-sys
is used in a different crate. The version used there clashed withjs-sys
used by some ofpiet-web
's dependencies. Acargo update
resolved this but i think it would be nice to only buildpiet-web
if desired. Not sure whether/how this works for workspaces.piet-common
uses theweb
feature to selectpiet-web
.