3 ms·
Does that mean it only needs internet for the first build. And then, subsequent builds won’t need internet connection (if I don’t add new dependencies, of cours
by mrbonner 7y ago
Does that mean it only needs internet for the first build. And then, subsequent builds won’t need internet connection (if I don’t add new dependencies, of course), kind of like Maven?
- sanxiyn 7y agoNo, you can do everything, including the first build, offline.
- mrbonner 7y agoSorry, I should’ve been clearer: I need cargo to be online the 1st time so that it could resolve my dependencies for me online the 1st time because I don’t want to setup local repos and stuff. Thanks
- pitaj 7y agoIf you use dependencies from crates.io or other online sources, then yes you'd need to download those somehow. But that can be done separately, on an entirely different computer if you wanted.
- ucarion 7y agoYup, that works! It also downloads docs so you can `cargo doc` and then you can peruse the generated docs for all of your dependencies.
- steveklabnik 7y agoTo be clear, it downloads the source code, and then “cargo doc” builds them from the source.
- joseluis 7y agoThat's the usual way it's done. It should be technically possible to replicate cargo's functionality by predownloading the dependencies and deploying them... Before actually needing them. Nevertheless if you depend on any external crates you have to have access to them, even if only by referencing a local path.