Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bazel/WASM.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ In order to update Cargo dependencies, please make sure that Rust and Cargo
are installed, and run this tool:

```
bash tools/update_crates.sh
bazel run //bazel/external/cargo:crates_vendor -- --repin
```

which will regenerate Bazel rules in `bazel/external/cargo/`.
Expand Down
51 changes: 16 additions & 35 deletions bazel/external/cargo/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,40 +1,21 @@
"""
@generated
cargo-raze generated Bazel file.
load("@rules_rust//crate_universe:defs.bzl", "crates_vendor")

DO NOT EDIT! Replaced on runs of cargo-raze
"""

package(default_visibility = ["//visibility:public"])

licenses([
"notice", # See individual crates for specific licenses
])

# Aliased targets
alias(
name = "protobuf",
actual = "@raze__protobuf__2_24_1//:protobuf",
tags = [
"cargo-raze",
"manual",
],
)

# Export file for Stardoc support
exports_files(
glob([
"**/*.bazel",
"**/*.bzl",
]),
visibility = ["//visibility:public"],
[
"Cargo.toml",
"Cargo.Bazel.lock",
],
)

filegroup(
name = "srcs",
srcs = glob([
"**/*.bazel",
"**/*.bzl",
]),
visibility = ["//visibility:public"],
# Run this target to regenerate cargo_lockfile and vendor_path/*.
# $ bazelisk run bazel/external/cargo:crates_vendor -- --repin
crates_vendor(
name = "crates_vendor",
cargo_lockfile = ":Cargo.Bazel.lock",
generate_target_compatible_with = False,
manifests = [":Cargo.toml"],
mode = "remote",
repository_name = "cu",
tags = ["manual"],
vendor_path = "remote",
)
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4

[[package]]
name = "protobuf"
version = "2.24.1"
version = "2.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "db50e77ae196458ccd3dc58a31ea1a90b0698ab1b7928d89f644c25d72070267"
checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"

[[package]]
name = "proxy-wasm-envoy-tests"
Expand Down
5 changes: 0 additions & 5 deletions bazel/external/cargo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@ lto = true
opt-level = 3
panic = "abort"

[package.metadata.raze]
package_aliases_dir = "."
workspace_path = "//bazel/external/cargo"
genmode = "Remote"

[[example]]
name = "grpc_call_rust"
path = "../../../test/extensions/filters/http/wasm/test_data/grpc_call_rust.rs"
Expand Down
22 changes: 0 additions & 22 deletions bazel/external/cargo/crates.bzl

This file was deleted.

49 changes: 38 additions & 11 deletions bazel/external/cargo/remote/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,17 +1,44 @@
# Export file for Stardoc support
###############################################################################
# @generated
# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
# regenerate this file, run the following:
#
# bazel run @//bazel/external/cargo:crates_vendor
###############################################################################

package(default_visibility = ["//visibility:public"])

exports_files(
glob([
"**/*.bazel",
"**/*.bzl",
]),
visibility = ["//visibility:public"],
[
"cargo-bazel.json",
"crates.bzl",
"defs.bzl",
] + glob(
include = ["*.bazel"],
allow_empty = True,
),
)

filegroup(
name = "srcs",
srcs = glob([
"**/*.bazel",
"**/*.bzl",
]),
visibility = ["//visibility:public"],
srcs = glob(
include = [
"*.bazel",
"*.bzl",
],
allow_empty = True,
),
)

# Workspace Member Dependencies
alias(
name = "protobuf-2.28.0",
actual = "@cu__protobuf-2.28.0//:protobuf",
tags = ["manual"],
)

alias(
name = "protobuf",
actual = "@cu__protobuf-2.28.0//:protobuf",
tags = ["manual"],
)
88 changes: 0 additions & 88 deletions bazel/external/cargo/remote/BUILD.protobuf-2.24.1.bazel

This file was deleted.

118 changes: 118 additions & 0 deletions bazel/external/cargo/remote/BUILD.protobuf-2.28.0.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
###############################################################################
# @generated
# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To
# regenerate this file, run the following:
#
# bazel run @//bazel/external/cargo:crates_vendor
###############################################################################

load(
"@rules_rust//cargo:defs.bzl",
"cargo_build_script",
"cargo_toml_env_vars",
)
load("@rules_rust//rust:defs.bzl", "rust_library")

package(default_visibility = ["//visibility:public"])

cargo_toml_env_vars(
name = "cargo_toml_env_vars",
src = "Cargo.toml",
)

rust_library(
name = "protobuf",
srcs = glob(
include = ["**/*.rs"],
allow_empty = True,
),
compile_data = glob(
include = ["**"],
allow_empty = True,
exclude = [
"**/* *",
".tmp_git_root/**/*",
"BUILD",
"BUILD.bazel",
"WORKSPACE",
"WORKSPACE.bazel",
],
),
crate_root = "src/lib.rs",
edition = "2018",
rustc_env_files = [
":cargo_toml_env_vars",
],
rustc_flags = [
"--cap-lints=allow",
],
tags = [
"cargo-bazel",
"crate-name=protobuf",
"manual",
"noclippy",
"norustfmt",
],
version = "2.28.0",
deps = [
"@cu__protobuf-2.28.0//:build_script_build",
],
)

cargo_build_script(
name = "_bs",
srcs = glob(
include = ["**/*.rs"],
allow_empty = True,
),
compile_data = glob(
include = ["**"],
allow_empty = True,
exclude = [
"**/* *",
"**/*.rs",
".tmp_git_root/**/*",
"BUILD",
"BUILD.bazel",
"WORKSPACE",
"WORKSPACE.bazel",
],
),
crate_name = "build_script_build",
crate_root = "build.rs",
data = glob(
include = ["**"],
allow_empty = True,
exclude = [
"**/* *",
".tmp_git_root/**/*",
"BUILD",
"BUILD.bazel",
"WORKSPACE",
"WORKSPACE.bazel",
],
),
edition = "2018",
pkg_name = "protobuf",
rustc_env_files = [
":cargo_toml_env_vars",
],
rustc_flags = [
"--cap-lints=allow",
],
tags = [
"cargo-bazel",
"crate-name=protobuf",
"manual",
"noclippy",
"norustfmt",
],
version = "2.28.0",
visibility = ["//visibility:private"],
)

alias(
name = "build_script_build",
actual = ":_bs",
tags = ["manual"],
)
Loading
Loading