Rust offline question,need help

my project needs to be compiled under the non-network environment

  1. I use cargo vendor to generate dependencies
  2. copy the project and vendor to the offline environment
  3. modify the /root/.cargo/config.toml, add vendor source into config.toml
  4. run cargo build --offline,
    but it still need to access github networking,how to fix it? thanks

(If you have up to date crate sources already downloaded (as should be the case with vendoring), --frozen is the flag to use. --offline also additionally changes dependency resolution to prefer crate versions you have downloaded already, which in your case should not be necessary.)

What did you put in /root/.cargo/config.toml? And does it work if you move it to /path/to/project/.cargo/config.toml.

[source.crates-io]
replace-with = 'vendored-sources'
[source.vendored-sources]
directory = "/home/test/tikv/vendor"
i try to move to my project directory,it also not worked;i want to copy /root/.cargo to offline environment