| # Copyright 2026 Open Source Robotics Foundation, Inc. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| bazel_dep(name = "zenoh-cpp") |
| local_path_override( |
| module_name = "zenoh-cpp", |
| path = "..", |
| ) |
| |
| bazel_dep(name = "platforms", version = "1.1.0") |
| bazel_dep(name = "rules_cc", version = "0.2.19") |
| bazel_dep(name = "rules_rs", version = "0.0.93") |
| bazel_dep(name = "rules_shell", version = "0.6.1") |
| bazel_dep(name = "llvm", version = "0.8.9") |
| |
| toolchains = use_extension("@rules_rs//rs/toolchains:module_extension.bzl", "toolchains") |
| toolchains.toolchain( |
| edition = "2021", |
| version = "1.93.0", |
| ) |
| use_repo(toolchains, "default_rust_toolchains") |
| |
| rules_rust = use_extension("@rules_rs//rs:rules_rust.bzl", "rules_rust") |
| use_repo(rules_rust, "rules_rust") |
| |
| register_toolchains( |
| "@default_rust_toolchains//:all", |
| "@llvm//toolchain:all", |
| ) |
| |
| crate = use_extension("@rules_rs//rs:extensions.bzl", "crate") |
| crate.from_cargo( |
| name = "zenoh_cpp_bindeps", |
| cargo_lock = "//:Cargo.lock", |
| cargo_toml = "//:Cargo.toml", |
| platform_triples = [ |
| "aarch64-apple-darwin", |
| "aarch64-pc-windows-msvc", |
| "aarch64-unknown-linux-gnu", |
| "x86_64-apple-darwin", |
| "x86_64-pc-windows-msvc", |
| "x86_64-unknown-linux-gnu", |
| ], |
| ) |
| crate.annotation( |
| crate = "zenohd", |
| crate_features = ["shared-memory"], |
| gen_binaries = ["zenohd"], |
| ) |
| use_repo(crate, "zenoh_cpp_bindeps") |