Skip to content

Commit

Permalink
upgrade rules_rust (to 0.26.0) and rust (to 1.71.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
Calsign committed Aug 12, 2023
1 parent f038995 commit 1595d07
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ gazelle(
)

# NOTE: need to use the version of protobuf from rules_rust so that it matches
# gazelle:resolve rust protobuf @rules_rust//proto/3rdparty/crates:protobuf
# gazelle:resolve rust protobuf @rules_rust//proto/protobuf/3rdparty/crates:protobuf

# NOTE: use cargo_bazel to parse the lockfile
# gazelle:resolve rust cargo_bazel @rules_rust//crate_universe:cargo_bazel
Expand Down
5 changes: 3 additions & 2 deletions deps2.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@bazel_gazelle//:deps.bzl", "gazelle_dependencies")

# protobuf
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
load("@rules_rust//proto:repositories.bzl", "rust_proto_repositories")
load("@rules_rust//proto/protobuf:repositories.bzl", "rust_proto_protobuf_dependencies", "rust_proto_protobuf_register_toolchains")

# versions of dependencies
load(":deps_versions.bzl", "versions")
Expand All @@ -22,4 +22,5 @@ def gazelle_rust_dependencies2():
rules_proto_dependencies()
rules_proto_toolchains()

rust_proto_repositories()
rust_proto_protobuf_dependencies()
rust_proto_protobuf_register_toolchains()
6 changes: 3 additions & 3 deletions deps_versions.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ versions = struct(
GO_VERSION = "1.21.0",

# rules_rust
RULES_RUST_VERSION = "0.20.0",
RULES_RUST_SHA256 = "950a3ad4166ae60c8ccd628d1a8e64396106e7f98361ebe91b0bcfe60d8e4b60",
RULES_RUST_VERSION = "0.26.0",
RULES_RUST_SHA256 = "9d04e658878d23f4b00163a72da3db03ddb451273eb347df7d7c50838d698f49",

# rust
RUST_VERSION = "1.68.2",
RUST_VERSION = "1.71.0",
)
6 changes: 3 additions & 3 deletions example/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ http_archive(
name = "rules_rust",
# NOTE: This patch is currently necessary for gazelle_rust to parse crate_universe lockfiles.
patches = ["@gazelle_rust//patches:rules_rust.patch"],
sha256 = "950a3ad4166ae60c8ccd628d1a8e64396106e7f98361ebe91b0bcfe60d8e4b60",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.20.0/rules_rust-v0.20.0.tar.gz"],
sha256 = "9d04e658878d23f4b00163a72da3db03ddb451273eb347df7d7c50838d698f49",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.26.0/rules_rust-v0.26.0.tar.gz"],
)

load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
Expand All @@ -22,7 +22,7 @@ rules_rust_dependencies()

rust_register_toolchains(
edition = "2021",
versions = ["1.68.2"],
versions = ["1.71.0"],
)

load("@rules_rust//crate_universe:defs.bzl", "crate", "crates_repository")
Expand Down
2 changes: 1 addition & 1 deletion proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
load("@rules_rust//proto:proto.bzl", "rust_proto_library")
load("@rules_rust//proto/protobuf:proto.bzl", "rust_proto_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

proto_library(
Expand Down
2 changes: 1 addition & 1 deletion rust_parser/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ rust_binary(
":parser",
"//3rdparty/crates:clap",
"//proto:messages_rust_proto",
"@rules_rust//proto/3rdparty/crates:protobuf",
"@rules_rust//proto/protobuf/3rdparty/crates:protobuf",
],
)

Expand Down

0 comments on commit 1595d07

Please sign in to comment.