@@ -10,16 +10,7 @@ so you need to install `rustup component add rust-src` for the specific version.
1010cargo generate-lockfile
1111```
1212
13- * Generate the local registry:
14-
15- Note that we use both commands to vendor both registry and crates. No idea why both are necessary.
16-
17- * First we need to install the tool if you don't already have it:
18- ``` bash
19- cargo install --version 0.2.7 cargo-local-registry
20- ```
21-
22- * Now add the local packages:
13+ * Generate the vendor dir:
2314
2415``` bash
2516export CH_TOP_DIR=$( git rev-parse --show-toplevel)
@@ -31,33 +22,16 @@ export DELTA_LAKE_DIR="$CH_TOP_DIR"/contrib/delta-kernel-rs
3122rm -rf " $CH_TOP_DIR " /contrib/rust_vendor/*
3223
3324cd " $CH_TOP_DIR " /rust/workspace
34- cargo local-registry --git --sync Cargo.lock " $CH_TOP_DIR " /contrib/rust_vendor
25+ cargo vendor --no-delete --locked --versioned-dirs --manifest-path Cargo.toml " $CH_TOP_DIR " /contrib/rust_vendor
3526
3627# Now handle delta-lake
3728cd " $DELTA_LAKE_DIR "
38- cargo local-registry --no-delete --git --sync " $DELTA_LAKE_DIR / Cargo.lock " " $CH_TOP_DIR " /contrib/rust_vendor
29+ cargo vendor --no-delete --locked --versioned-dirs --manifest-path Cargo.toml " $CH_TOP_DIR " /contrib/rust_vendor
3930
4031# Standard library deps
41- cp " $RUSTC_ROOT " /lib/rustlib/src/rust/library/Cargo.lock " $RUSTC_ROOT " /lib/rustlib/src/rust/library/std/
42- cargo local-registry --no-delete --git --sync " $RUSTC_ROOT " /lib/rustlib/src/rust/library/std/Cargo.lock " $CH_TOP_DIR " /contrib/rust_vendor
43- cp " $RUSTC_ROOT " /lib/rustlib/src/rust/library/Cargo.lock " $RUSTC_ROOT " /lib/rustlib/src/rust/library/test/
44- cargo local-registry --no-delete --git --sync " $RUSTC_ROOT " /lib/rustlib/src/rust/library/test/Cargo.lock " $CH_TOP_DIR " /contrib/rust_vendor
45-
46- # Now we vendor the modules themselves
47- cd " $CH_TOP_DIR " /rust/workspace
48- cargo vendor --no-delete --locked " $CH_TOP_DIR " /contrib/rust_vendor
49- cd " $DELTA_LAKE_DIR "
50- cargo vendor --no-delete --locked " $CH_TOP_DIR " /contrib/rust_vendor
51- cd " $RUSTC_ROOT " /lib/rustlib/src/rust/library/std/
52- cargo vendor --no-delete " $CH_TOP_DIR " /contrib/rust_vendor
53- cd " $RUSTC_ROOT " /lib/rustlib/src/rust/library/test/
54- cargo vendor --no-delete " $CH_TOP_DIR " /contrib/rust_vendor
55-
56- # Remove windows only dependencies (which are really heavy and we don't want in the repo)
57- rm -rf " $CH_TOP_DIR " /contrib/rust_vendor/winapi* " $CH_TOP_DIR " /contrib/rust_vendor/windows*
32+ cargo vendor --no-delete --locked --versioned-dirs --manifest-path " $RUSTC_ROOT " /lib/rustlib/src/rust/library/std/Cargo.toml " $CH_TOP_DIR " /contrib/rust_vendor
33+ cargo vendor --no-delete --locked --versioned-dirs --manifest-path " $RUSTC_ROOT " /lib/rustlib/src/rust/library/test/Cargo.toml " $CH_TOP_DIR " /contrib/rust_vendor
5834
59- # Cleanup the lock files we copied
60- rm " $RUSTC_ROOT " /lib/rustlib/src/rust/library/std/Cargo.lock " $RUSTC_ROOT " /lib/rustlib/src/rust/library/test/Cargo.lock
6135cd " $CH_TOP_DIR " /rust/workspace
6236```
6337
0 commit comments