I would like to use the tango client crate for a Rust project at work, however the environment that I will be developing this in does not have direct access to the internet. This means that the standard method of adding the dependency to Cargo.toml and running cargo build fails due to a network error.
The environment doesn't prevent me from copying data downloaded to an internet-connected computer, and so I was hoping that there would be a way for me to package the necessary files locally, and then point Cargo.toml to that location.
Is this possible? If so, how?
Answering my own question, thanks to a tip in a comment from @Dogbert.
The trick was to use
cargo vendoron the machine that has an internet connection. This will produce a directory calledvendorthat can be transferred to the other environment. On that environment, and within the directory from which you will runcargo build, create a new file in.cargo/config.Once you've done this, then
cargo buildshould work.