Skip to content

Commit

Permalink
Update bazelbuild/rules_rust to 0.16.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jan 5, 2023
1 parent 99eef7c commit 5768fc7
Show file tree
Hide file tree
Showing 20 changed files with 188 additions and 1,526 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "rules_rust",
sha256 = "5c2b6745236f8ce547f82eeacbbcc81d736734cc8bd92e60d3e3cdfa6e167bb5",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.15.0/rules_rust-v0.15.0.tar.gz"],
sha256 = "29ea0f1d0cad8fc90400479dee0a8b69204b7e6927081b5a27d6da872114a160",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.16.0/rules_rust-v0.16.0.tar.gz"],
)

load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")

rules_rust_dependencies()

rust_register_toolchains(
version = "1.66.0",
versions = ["1.66.0"],
)

load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
Expand Down
19 changes: 2 additions & 17 deletions third-party/bazel/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,9 @@ package(default_visibility = ["//visibility:public"])
exports_files(
[
"cargo-bazel.json",
"defs.bzl",
"crates.bzl",
] + glob([
"*.bazel",
]),
"defs.bzl",
] + glob(["*.bazel"]),
)

filegroup(
Expand Down Expand Up @@ -74,16 +72,3 @@ alias(
actual = "@vendor__syn-1.0.107//:syn",
tags = ["manual"],
)

# Binaries
alias(
name = "cc__gcc-shim",
actual = "@vendor__cc-1.0.78//:gcc-shim__bin",
tags = ["manual"],
)

alias(
name = "clap__stdio-fixture",
actual = "@vendor__clap-4.0.30//:stdio-fixture__bin",
tags = ["manual"],
)
60 changes: 7 additions & 53 deletions third-party/bazel/BUILD.bitflags-1.3.2.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,7 @@
# bazel run @//third-party:vendor
###############################################################################

# buildifier: disable=bzl-visibility
load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
load(
"@rules_rust//rust:defs.bzl",
"rust_library",
)
load("@rules_rust//rust:defs.bzl", "rust_library")

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

Expand All @@ -21,67 +16,26 @@ package(default_visibility = ["//visibility:public"])

rust_library(
name = "bitflags",
srcs = glob(
include = [
"**/*.rs",
],
exclude = [
],
),
aliases = select({
"//conditions:default": {
},
}),
srcs = glob(["**/*.rs"]),
compile_data = glob(
include = ["**"],
exclude = [
"**/* *",
"BUILD.bazel",
"BUILD",
"WORKSPACE.bazel",
"BUILD.bazel",
"WORKSPACE",
"WORKSPACE.bazel",
],
) + select_with_or({
"//conditions:default": [
],
}),
crate_features = [
"default",
],
),
crate_features = ["default"],
crate_root = "src/lib.rs",
data = select_with_or({
"//conditions:default": [
],
}),
edition = "2018",
proc_macro_deps = [
] + select({
"//conditions:default": [
],
}),
rustc_env = {
},
rustc_env_files = select_with_or({
"//conditions:default": [
],
}),
rustc_flags = [
# In most cases, warnings in 3rd party crates are not interesting as
# they're out of the control of consumers. The flag here silences
# warnings. For more details see:
# https://doc.rust-lang.org/rustc/lints/levels.html
"--cap-lints=allow",
],
rustc_flags = ["--cap-lints=allow"],
tags = [
"cargo-bazel",
"manual",
"noclippy",
"norustfmt",
],
version = "1.3.2",
deps = [
] + select({
"//conditions:default": [
],
}),
)
126 changes: 6 additions & 120 deletions third-party/bazel/BUILD.cc-1.0.78.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@
# bazel run @//third-party:vendor
###############################################################################

# buildifier: disable=bzl-visibility
load("@rules_rust//crate_universe/private:selects.bzl", "select_with_or")
load(
"@rules_rust//rust:defs.bzl",
"rust_binary",
"rust_library",
)
load("@rules_rust//rust:defs.bzl", "rust_library")

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

Expand All @@ -22,133 +16,25 @@ package(default_visibility = ["//visibility:public"])

rust_library(
name = "cc",
srcs = glob(
include = [
"**/*.rs",
],
exclude = [
],
),
aliases = select({
"//conditions:default": {
},
}),
srcs = glob(["**/*.rs"]),
compile_data = glob(
include = ["**"],
exclude = [
"**/* *",
"BUILD.bazel",
"BUILD",
"WORKSPACE.bazel",
"WORKSPACE",
],
) + select_with_or({
"//conditions:default": [
],
}),
crate_features = [
],
crate_root = "src/lib.rs",
data = select_with_or({
"//conditions:default": [
],
}),
edition = "2018",
proc_macro_deps = [
] + select({
"//conditions:default": [
],
}),
rustc_env = {
},
rustc_env_files = select_with_or({
"//conditions:default": [
],
}),
rustc_flags = [
# In most cases, warnings in 3rd party crates are not interesting as
# they're out of the control of consumers. The flag here silences
# warnings. For more details see:
# https://doc.rust-lang.org/rustc/lints/levels.html
"--cap-lints=allow",
],
tags = [
"cargo-bazel",
"manual",
"noclippy",
"norustfmt",
],
version = "1.0.78",
deps = [
] + select({
"//conditions:default": [
],
}),
)

rust_binary(
name = "gcc-shim__bin",
srcs = glob(
include = [
"**/*.rs",
],
exclude = [
],
),
aliases = select({
"//conditions:default": {
},
}),
compile_data = glob(
include = ["**"],
exclude = [
"**/* *",
"BUILD.bazel",
"BUILD",
"WORKSPACE.bazel",
"WORKSPACE",
"WORKSPACE.bazel",
],
) + select_with_or({
"//conditions:default": [
],
}),
crate_features = [
],
crate_root = "src/bin/gcc-shim.rs",
data = select_with_or({
"//conditions:default": [
],
}),
),
crate_root = "src/lib.rs",
edition = "2018",
proc_macro_deps = [
] + select({
"//conditions:default": [
],
}),
rustc_env = {
},
rustc_env_files = select_with_or({
"//conditions:default": [
],
}),
rustc_flags = [
# In most cases, warnings in 3rd party crates are not interesting as
# they're out of the control of consumers. The flag here silences
# warnings. For more details see:
# https://doc.rust-lang.org/rustc/lints/levels.html
"--cap-lints=allow",
],
rustc_flags = ["--cap-lints=allow"],
tags = [
"cargo-bazel",
"manual",
"noclippy",
"norustfmt",
],
version = "1.0.78",
deps = [
":cc",
] + select({
"//conditions:default": [
],
}),
)
Loading

0 comments on commit 5768fc7

Please sign in to comment.