Generating lockfile without network access

I'm trying to generate a lockfile for a crate but I would like to prevent any sort of network access to ensure the build works offline. I tried "cargo generate-lockfile --frozen" but unfortunately it looks like "frozen" implies "locked" (https://github.com/rust-lang/cargo/blob/master/src/cargo/util/config.rs#L365). Any reason why and any alternative?

2 Likes

I need this functionality too. Here's the cargo issue: https://github.com/rust-lang/cargo/issues/3479

1 Like