| # Copyright (c) 2024 Contributors to the Eclipse Foundation |
| # |
| # See the NOTICE file(s) distributed with this work for additional |
| # information regarding copyright ownership. |
| # |
| # This program and the accompanying materials are made available under the |
| # terms of the Apache Software License 2.0 which is available at |
| # https://www.apache.org/licenses/LICENSE-2.0, or the MIT license |
| # which is available at https://opensource.org/licenses/MIT. |
| # |
| # SPDX-License-Identifier: Apache-2.0 OR MIT |
| |
| ############################################################################### |
| # Bazel now uses Bzlmod by default to manage external dependencies. |
| # Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel. |
| # |
| # For more details, please check https://github.com/bazelbuild/bazel/issues/18958 |
| ############################################################################### |
| module( |
| name = "iceoryx2", |
| version = "0.9.2", |
| ) |
| |
| bazel_dep(name = "bazel_features", version = "1.32.0") |
| bazel_dep(name = "bazel_skylib", version = "1.8.2") |
| |
| bazel_dep(name = "googletest", version = "1.14.0.bcr.1", dev_dependency = True) |
| |
| bazel_dep(name = "platforms", version = "1.0.0") |
| bazel_dep(name = "rules_cc", version = "0.2.8") |
| bazel_dep(name = "rules_rust", version = "0.68.1") |
| bazel_dep(name = "rules_rust_bindgen", version = "0.68.1") |
| bazel_dep(name = "toolchains_llvm", version = "1.5.0") |
| |
| # LLVM for bindgen |
| # Note: When iceoryx2 is used as a dependency (not root module), the root module |
| # must set up the llvm extension and provide a bindgen toolchain. |
| # When building iceoryx2 directly (as root module), we set it up here. |
| llvm = use_extension("@toolchains_llvm//toolchain/extensions:llvm.bzl", "llvm", dev_dependency = True) |
| llvm.toolchain(llvm_version = "17.0.6") |
| use_repo(llvm, "llvm_toolchain_llvm") |
| |
| rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") |
| rust.toolchain( |
| edition = "2024", |
| versions = ["1.85.0"], |
| ) |
| use_repo(rust, "rust_toolchains") |
| |
| register_toolchains( |
| "@rust_toolchains//:all", |
| "//bazel/bindgen:toolchain", |
| ) |
| |
| crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate") |
| crate.annotation( |
| crate = "cbindgen", |
| gen_binaries = ["cbindgen"], |
| ) |
| crate.from_cargo( |
| name = "crate_index", |
| cargo_lockfile = "//:Cargo.lock", |
| # lockfile = "//:Cargo.Bazel.lock", |
| manifests = [ |
| "//:Cargo.toml", |
| "//:benchmarks/event/Cargo.toml", |
| "//:benchmarks/publish-subscribe/Cargo.toml", |
| "//:benchmarks/queue/Cargo.toml", |
| "//:benchmarks/request-response/Cargo.toml", |
| "//:component-tests/rust/Cargo.toml", |
| "//:examples/Cargo.toml", |
| "//:iceoryx2-services/tunnel/Cargo.toml", |
| "//:iceoryx2-services/tunnel-end-to-end-tests/Cargo.toml", |
| "//:iceoryx2-services/tunnel-backend/Cargo.toml", |
| "//:iceoryx2-services/tunnel-conformance-tests/Cargo.toml", |
| "//:iceoryx2-services/discovery/Cargo.toml", |
| "//:iceoryx2-log/log/Cargo.toml", |
| "//:iceoryx2-log/types/Cargo.toml", |
| "//:iceoryx2/Cargo.toml", |
| "//:iceoryx2/conformance-tests/Cargo.toml", |
| "//:iceoryx2-bb/print/Cargo.toml", |
| "//:iceoryx2-bb/loggers/Cargo.toml", |
| "//:iceoryx2-bb/concurrency/Cargo.toml", |
| "//:iceoryx2-bb/container/Cargo.toml", |
| "//:iceoryx2-bb/derive-macros/Cargo.toml", |
| "//:iceoryx2-bb/elementary/Cargo.toml", |
| "//:iceoryx2-bb/elementary-traits/Cargo.toml", |
| "//:iceoryx2-bb/linux/Cargo.toml", |
| "//:iceoryx2-bb/lock-free/Cargo.toml", |
| "//:iceoryx2-bb/memory/Cargo.toml", |
| "//:iceoryx2-bb/posix/Cargo.toml", |
| "//:iceoryx2-bb/system-types/Cargo.toml", |
| "//:iceoryx2-bb/testing/Cargo.toml", |
| "//:iceoryx2-bb/threadsafe/Cargo.toml", |
| "//:iceoryx2-bb/trait-tests/Cargo.toml", |
| "//:iceoryx2-cal/Cargo.toml", |
| "//:iceoryx2-cal/conformance-tests/Cargo.toml", |
| "//:iceoryx2-cli/Cargo.toml", |
| "//:iceoryx2-ffi/ffi-macros/Cargo.toml", |
| "//:iceoryx2-ffi/c/Cargo.toml", |
| "//:iceoryx2-ffi/python/Cargo.toml", |
| "//:iceoryx2-pal/concurrency-sync/Cargo.toml", |
| "//:iceoryx2-pal/configuration/Cargo.toml", |
| "//:iceoryx2-pal/os-api/Cargo.toml", |
| "//:iceoryx2-pal/posix/Cargo.toml", |
| "//:iceoryx2-pal/testing/Cargo.toml", |
| "//:iceoryx2-userland/record-and-replay/Cargo.toml", |
| ], |
| ) |
| use_repo(crate, "crate_index") |