-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(build): refine the locking of Rust dependencies
- Loading branch information
Showing
7 changed files
with
76 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
"""Setup Crates repostories """ | ||
|
||
load("@kong_crate_index//:defs.bzl", "crate_repositories") | ||
load("@atc_router_crate_index//:defs.bzl", atc_router_crate_repositories = "crate_repositories") | ||
|
||
def kong_crates(): | ||
crate_repositories() | ||
atc_router_crate_repositories() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Crate Locks | ||
|
||
This directory contains the lock files for the Rust dependencies. | ||
|
||
* `xxx.Cargo.lock`: This file is generated by `cargo`, but we generate it with `bazel` to make the `rules_rust` happy. | ||
* `xxx.lock`: This file is generated by `bazel` and is used by `rules_rust` for reproducibility. | ||
|
||
## Repin | ||
|
||
For more information on how to repin the dependencies, | ||
please check out the [rules_rust](https://github.com/bazelbuild/rules_rust). | ||
|
||
### Bash | ||
|
||
```bash | ||
crates="atc_router_crate_index" | ||
CARGO_BAZEL_REPIN=1 CARGO_BAZEL_REPIN_ONLY=$scrates bazel sync --only=$crates | ||
unset crates | ||
``` | ||
|
||
### Fish | ||
|
||
```fish | ||
set -l crates \ | ||
atc_router_crate_index | ||
CARGO_BAZEL_REPIN=1 CARGO_BAZEL_REPIN_ONLY=$(string join ',' $crates) bazel sync --only=$(string join ',' $crates) | ||
set -e crates | ||
``` |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9918f6d
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bazel Build
Docker image available
kong/kong:9918f6da67d898cd02bec61442803286e532303d
Artifacts available https://github.com/Kong/kong/actions/runs/11949383389