You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When building for a single platform naersk downloads the dependencies for all platforms. Ideally it would only download for the current target. For example when building a project that depends on tokio on linux it downloads all of the winapi crates.
One downside is that the crates derivation will be different for different OSes. I don't think this is an issue because right now the checksum is done per-crate so that shouldn't be an issue. Maybe slightly wasted space if we build up different dependency trees for different platforms? But symlinking or hardlinking would likely resolve that.
The text was updated successfully, but these errors were encountered:
We have to download / checkout crate even if to read its Cargo.toml (to see the targets), and if we do that, then we might as well just keep the downloaded crate around.
Is there some magic Cargo.lock-per-platform I'm not aware of? 😅
Yup, the dependant crate has the dependency conditions in its Cargo.toml. If you look at Tokio's dependencies you will see that lots of them are conditional on the platform.
When building for a single platform naersk downloads the dependencies for all platforms. Ideally it would only download for the current target. For example when building a project that depends on
tokio
on linux it downloads all of thewinapi
crates.One downside is that the crates derivation will be different for different OSes. I don't think this is an issue because right now the checksum is done per-crate so that shouldn't be an issue. Maybe slightly wasted space if we build up different dependency trees for different platforms? But symlinking or hardlinking would likely resolve that.
The text was updated successfully, but these errors were encountered: