Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update dependency rules_rust to v0.54.1 #394

Merged
merged 9 commits into from
Dec 8, 2024
5 changes: 1 addition & 4 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ rust_setup_stage_2()

load("//repositories:rust_setup_stage_3.bzl", "rust_setup_stage_3")

rust_setup_stage_3(
# Only needed for CI here, see https://github.com/bazelbuild/rules_rust/pull/2698.
generator = "@com_github_mvukov_rules_ros2_cargo_bazel//:cargo-bazel",
)
rust_setup_stage_3()

load("//repositories:rust_setup_stage_4.bzl", "rust_setup_stage_4")

Expand Down
5 changes: 1 addition & 4 deletions examples/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,7 @@ rust_setup_stage_2()

load("@com_github_mvukov_rules_ros2//repositories:rust_setup_stage_3.bzl", "rust_setup_stage_3")

rust_setup_stage_3(
# Only needed for CI here, see https://github.com/bazelbuild/rules_rust/pull/2698.
generator = "@com_github_mvukov_rules_ros2_cargo_bazel//:cargo-bazel",
)
rust_setup_stage_3()

load("@com_github_mvukov_rules_ros2//repositories:rust_setup_stage_4.bzl", "rust_setup_stage_4")

Expand Down
3 changes: 2 additions & 1 deletion examples/zero_copy/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {

let node = rclrs::create_node(&context, "minimal_subscriber")?;

let subscription_node = node.clone();
let _subscription = node.create_subscription::<chatter_interface::msg::Chatter, _>(
"topic",
rclrs::QOS_PROFILE_DEFAULT,
Expand All @@ -23,7 +24,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
.as_micros() as u64;
let delay_us = now - msg.timestamp;
let data_length = msg.data_length as usize;
rclrs::log_info!(node.logger_name(),
rclrs::log_info!(subscription_node.logger_name(),
"Delay {} us, I heard: '{:?}'",
delay_us,
String::from_utf8(msg.data[..data_length].to_vec()).unwrap()
Expand Down
2 changes: 1 addition & 1 deletion repositories/ros2_rust.BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ load("@com_github_mvukov_rules_ros2//ros2:rust_interfaces.bzl", "rust_ros2_inter
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_python//python:defs.bzl", "py_binary")
load("@rules_ros2_pip_deps//:requirements.bzl", "requirement")
load("@rules_rust//bindgen:defs.bzl", "rust_bindgen")
load("@rules_rust//rust:defs.bzl", "rust_library")
load("@rules_rust_bindgen//:defs.bzl", "rust_bindgen")

rust_library(
name = "rosidl_runtime_rs",
Expand Down
6 changes: 3 additions & 3 deletions repositories/rust/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("@rules_rust//bindgen:defs.bzl", "rust_bindgen_toolchain")
load("@rules_rust_bindgen//:defs.bzl", "rust_bindgen_toolchain")

exports_files([
"Cargo.Bazel.lock",
Expand All @@ -7,13 +7,13 @@ exports_files([

rust_bindgen_toolchain(
name = "bindgen_toolchain_impl",
bindgen = "@rules_rust//bindgen/3rdparty:bindgen",
bindgen = "@rules_rust_bindgen//3rdparty:bindgen",
clang = "@rules_ros2_config_clang//:clang",
libclang = "@rules_ros2_config_clang//:libclang",
)

toolchain(
name = "bindgen_toolchain",
toolchain = "bindgen_toolchain_impl",
toolchain_type = "@rules_rust//bindgen:toolchain_type",
toolchain_type = "@rules_rust_bindgen//:toolchain_type",
)
39 changes: 29 additions & 10 deletions repositories/rust/Cargo.Bazel.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"checksum": "56b4467eddf4d24526b75eca004ff68d26b3c2b156e82846a78e508cf67c8ec2",
"checksum": "f8788f084d097ba7b0199b9a7d416c14f5df9c03b2fc49f422506f01b2b56597",
"crates": {
"autocfg 1.3.0": {
"name": "autocfg",
Expand Down Expand Up @@ -748,6 +748,9 @@
"version": "0.2.155"
},
"build_script_attrs": {
"compile_data_glob": [
"**"
],
"data_glob": [
"**"
]
Expand Down Expand Up @@ -949,6 +952,9 @@
"version": "1.0.81"
},
"build_script_attrs": {
"compile_data_glob": [
"**"
],
"data_glob": [
"**"
]
Expand Down Expand Up @@ -1126,6 +1132,9 @@
"version": "1.0.201"
},
"build_script_attrs": {
"compile_data_glob": [
"**"
],
"data_glob": [
"**"
]
Expand Down Expand Up @@ -1324,6 +1333,9 @@
"version": "1.0.128"
},
"build_script_attrs": {
"compile_data_glob": [
"**"
],
"data_glob": [
"**"
]
Expand Down Expand Up @@ -1405,6 +1417,9 @@
"version": "0.3.17"
},
"build_script_attrs": {
"compile_data_glob": [
"**"
],
"data_glob": [
"**"
]
Expand Down Expand Up @@ -1525,6 +1540,9 @@
"version": "0.4.9"
},
"build_script_attrs": {
"compile_data_glob": [
"**"
],
"data_glob": [
"**"
],
Expand Down Expand Up @@ -1667,15 +1685,15 @@
"aarch64-apple-ios-sim": [
"aarch64-apple-ios-sim"
],
"aarch64-fuchsia": [
"aarch64-fuchsia"
],
"aarch64-linux-android": [
"aarch64-linux-android"
],
"aarch64-pc-windows-msvc": [
"aarch64-pc-windows-msvc"
],
"aarch64-unknown-fuchsia": [
"aarch64-unknown-fuchsia"
],
"aarch64-unknown-linux-gnu": [
"aarch64-unknown-linux-gnu"
],
Expand Down Expand Up @@ -1730,18 +1748,15 @@
"wasm32-unknown-unknown": [
"wasm32-unknown-unknown"
],
"wasm32-wasi": [
"wasm32-wasi"
"wasm32-wasip1": [
"wasm32-wasip1"
],
"x86_64-apple-darwin": [
"x86_64-apple-darwin"
],
"x86_64-apple-ios": [
"x86_64-apple-ios"
],
"x86_64-fuchsia": [
"x86_64-fuchsia"
],
"x86_64-linux-android": [
"x86_64-linux-android"
],
Expand All @@ -1751,6 +1766,9 @@
"x86_64-unknown-freebsd": [
"x86_64-unknown-freebsd"
],
"x86_64-unknown-fuchsia": [
"x86_64-unknown-fuchsia"
],
"x86_64-unknown-linux-gnu": [
"x86_64-unknown-linux-gnu"
],
Expand All @@ -1768,5 +1786,6 @@
"serde_json 1.0.128",
"signal-hook 0.3.17"
],
"direct_dev_deps": []
"direct_dev_deps": [],
"unused_patches": []
}
24 changes: 9 additions & 15 deletions repositories/rust_setup_stage_1.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,15 @@ def rust_setup_stage_1():
maybe(
http_archive,
name = "rules_rust",
sha256 = "7931e7b544107b62029bf2fc72e79f9d77523ad650d442d93c3fcce9ad5ec1eb",
url = "https://github.com/bazelbuild/rules_rust/releases/download/0.52.0/rules_rust-v0.52.0.tar.gz",
sha256 = "b191375028448a69532046e901d8e6e627a6b00d58bec79027a05c1d3e090d00",
url = "https://github.com/bazelbuild/rules_rust/releases/download/0.55.1/rules_rust-0.55.1.tar.gz",
)

maybe(
http_archive,
name = "rules_rust_bindgen",
sha256 = "866c67cb176971cde5d935dc2c4c21e877718ca78f1fbc30b9699f41205f5815",
urls = ["https://github.com/bazelbuild/rules_rust/releases/download/0.55.1/rules_rust_bindgen-0.55.1.tar.gz"],
)

maybe(
Expand All @@ -24,16 +31,3 @@ def rust_setup_stage_1():
"@com_github_mvukov_rules_ros2//repositories/patches:ros2_rust_logging.patch",
],
)

# Only needed for CI, see https://github.com/bazelbuild/rules_rust/pull/2698.
maybe(
http_archive,
name = "com_github_mvukov_rules_ros2_cargo_bazel",
build_file_content = """
exports_files([
"cargo-bazel",
])
""",
sha256 = "6d6d68b898b38cb58d3c29e2e54d5795e2f652ebcac1ecf3bb0ac99fc86480e7",
url = "https://github.com/mvukov/rules_rust/releases/download/0.46.0-mvukov-cargo-bazel/cargo-bazel.zip",
)
2 changes: 1 addition & 1 deletion repositories/rust_setup_stage_2.bzl
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
load("@rules_rust//bindgen:repositories.bzl", "rust_bindgen_dependencies")
load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")
load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_register_toolchains")
load("@rules_rust_bindgen//:repositories.bzl", "rust_bindgen_dependencies")
load("//repositories:clang_configure.bzl", "clang_configure")

def rust_setup_stage_2():
Expand Down