Skip to content

Commit 618dcc9

Browse files
committed
Update VENDOR.md
1 parent 28de068 commit 618dcc9

File tree

1 file changed

+7
-31
lines changed

1 file changed

+7
-31
lines changed

rust/VENDOR.md

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,54 +10,30 @@ so you need to install `rustup component add rust-src` for the specific version.
1010
cargo 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
2516
export CH_TOP_DIR=$(git rev-parse --show-toplevel)
2617
export RUSTC_ROOT=$(rustc --print=sysroot)
2718
# Currently delta-lake is built outside the workspace (TODO)
2819
export DELTA_LAKE_DIR="$CH_TOP_DIR"/contrib/delta-kernel-rs
2920

21+
# 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
22+
3023
# Clean the vendor repo
3124
rm -rf "$CH_TOP_DIR"/contrib/rust_vendor/*
3225

3326
cd "$CH_TOP_DIR"/rust/workspace
34-
cargo local-registry --git --sync Cargo.lock "$CH_TOP_DIR"/contrib/rust_vendor
27+
cargo cargo vendor --no-delete --locked --versioned-dirs --manifest-path Cargo.toml "$CH_TOP_DIR"/contrib/rust_vendor
3528

3629
# Now handle delta-lake
3730
cd "$DELTA_LAKE_DIR"
38-
cargo local-registry --no-delete --git --sync "$DELTA_LAKE_DIR/Cargo.lock" "$CH_TOP_DIR"/contrib/rust_vendor
31+
cargo cargo vendor --no-delete --locked --versioned-dirs --manifest-path Cargo.toml "$CH_TOP_DIR"/contrib/rust_vendor
3932

4033
# 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*
34+
cargo 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
35+
cargo 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
5836

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
6137
cd "$CH_TOP_DIR"/rust/workspace
6238
```
6339

0 commit comments

Comments
 (0)