Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upEnable Cargo to work without any network access #2111
Comments
This comment has been minimized.
This comment has been minimized.
|
It'd also be nice if cargo didn't blow up if it fails to hit the network for downloading the index and instead tries to continue as far as possible. |
This comment has been minimized.
This comment has been minimized.
|
cc #1882 |
This comment has been minimized.
This comment has been minimized.
|
For solving gecko's case, where they primarily don't want the build servers talking to the network, @alexcrichton favors a Even if we can sell that to gecko, I'm skeptical that Linux distros will like it - they want to use their package system to track Rust packages, and they don't want to duplicate the source of dependencies. |
This comment has been minimized.
This comment has been minimized.
|
So for Yocto, I would be comfortable with something similar to the Gecko use case. With Yocto the compilation of a package is broken up into several tasks (similar to Gentoo) and once the do_fetch task has ended there shouldn't be anymore network access. This is because Yocto supports users to build in no network access environments and to provide their own source cache which had previously been fetched. To best support this for Cargo built packages I call Hopefully that helps explain my use case and adds some support behind this item. |
This comment has been minimized.
This comment has been minimized.
|
+1 Failure to update registry (while there is some usable cached version) should suggest an option to switch offline mode on. Editing dependency version in In general: Internet access shouldn't always be taken for granted. |
This comment has been minimized.
This comment has been minimized.
|
Having a node background, this behavior on cargo was unexpected:
These are separate steps because there are no guarantees as to where someone might be working from. I think I think |
brson commentedNov 4, 2015
Build farms need to build Cargo projects without hitting the network. Assuming that distros rewrite their Cargo.tomls to convert dependencies to local paths, then as far as I know the other source of network access is just updating the index.
re https://internals.rust-lang.org/t/perfecting-rust-packaging-the-plan/2767