Installing and using Rust offline

I am working in an environment where active internet connection is not available.
How I can install Rust in offline mode?
How I can use Rust Crates in offline mode?

1 Like

Maybe this blog post can help you

3 Likes

Cargo has an --offline flag that lets it perform some operations offline, but it will have to be online at least sometimes to update its index and fetch the crates.

The blog post uses cargo-local-registry, I personally use cargo vendor (now in upstream cargo). What is the difference between the two commands? In which cases should I prefer one over the other (when pre-downloading dependencies on a connected machine to build projects with these dependencies on an offline machine)?

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.