Skip to content

Commit

Permalink
[eclipse-iceoryx#439] Add bazel support for iceoryx2-ffi
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Oct 8, 2024
1 parent ba37ec4 commit a09c290
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
25 changes: 25 additions & 0 deletions iceoryx2-ffi/ffi-macros/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# 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

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

load("@rules_rust//rust:defs.bzl", "rust_proc_macro")

rust_proc_macro(
name = "iceoryx2-ffi-macros",
srcs = glob(["src/**/*.rs"]),
deps = [
"@crate_index//:proc-macro2",
"@crate_index//:quote",
"@crate_index//:syn",
],
)
23 changes: 23 additions & 0 deletions iceoryx2-ffi/ffi/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,31 @@
#
# SPDX-License-Identifier: Apache-2.0 OR MIT

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

load("@rules_rust//rust:defs.bzl", "rust_library")

filegroup(
name = "all_srcs",
srcs = glob(["**"]),
visibility = ["//visibility:public"],
)

rust_library(
name = "iceoryx2-ffi",
srcs = glob(["src/**/*.rs"]),
deps = [
"@//iceoryx2:iceoryx2",
"@//iceoryx2-bb/container:iceoryx2-bb-container",
"@//iceoryx2-bb/elementary:iceoryx2-bb-elementary",
"@//iceoryx2-bb/log:iceoryx2-bb-log",
"@//iceoryx2-bb/system-types:iceoryx2-bb-system-types",
"@//iceoryx2-cal:iceoryx2-cal",
"@crate_index//:serde",
],
proc_macro_deps = [
"@//iceoryx2-ffi/ffi-macros:iceoryx2-ffi-macros",
],
)

# TODO: [349] add tests

0 comments on commit a09c290

Please sign in to comment.