Skip to content

Commit b24dfb6

Browse files
committed
build(bazel): add supervisor-process and supervisor-network targets
Skills markdown and rego policies are include_str!-embedded and ride along as compile_data; supervisor-network's inline tests additionally embed testdata fixtures. Core grows the test-helpers feature to match what cargo's workspace feature unification produces for dev builds. Signed-off-by: Simon Scatton <sscatton@nvidia.com>
1 parent 1274f72 commit b24dfb6

3 files changed

Lines changed: 62 additions & 1 deletion

File tree

‎crates/openshell-core/BUILD.bazel‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ cargo_build_script(
3030
rust_library(
3131
name = "openshell_core",
3232
srcs = glob(["src/**/*.rs"]),
33-
crate_features = ["telemetry"],
33+
crate_features = [
34+
"telemetry",
35+
# Test-only flag-guard helpers wanted by supervisor/sandbox dev
36+
# builds; cargo's workspace feature unification enables this in dev
37+
# graphs the same way.
38+
"test-helpers",
39+
],
3440
edition = "2024",
3541
version = "0.0.0",
3642
visibility = ["//visibility:public"],
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
load("@crates//:defs.bzl", "all_crate_deps")
5+
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
6+
7+
rust_library(
8+
name = "openshell_supervisor_network",
9+
srcs = glob(["src/**/*.rs"]),
10+
compile_data = glob(["data/**"]),
11+
edition = "2024",
12+
visibility = ["//visibility:public"],
13+
deps = all_crate_deps(normal = True) + [
14+
"//crates/openshell-core:openshell_core",
15+
"//crates/openshell-ocsf:openshell_ocsf",
16+
"//crates/openshell-policy:openshell_policy",
17+
"//crates/openshell-router:openshell_router",
18+
],
19+
proc_macro_deps = all_crate_deps(proc_macro = True),
20+
)
21+
22+
rust_test(
23+
name = "openshell_supervisor_network_test",
24+
crate = ":openshell_supervisor_network",
25+
compile_data = glob(["testdata/**"]),
26+
deps = all_crate_deps(normal_dev = True),
27+
)
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
load("@crates//:defs.bzl", "all_crate_deps")
5+
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
6+
7+
rust_library(
8+
name = "openshell_supervisor_process",
9+
srcs = glob(["src/**/*.rs"]),
10+
compile_data = glob(
11+
["src/skills/**"],
12+
exclude = ["**/*.rs"],
13+
),
14+
edition = "2024",
15+
visibility = ["//visibility:public"],
16+
deps = all_crate_deps(normal = True) + [
17+
"//crates/openshell-core:openshell_core",
18+
"//crates/openshell-ocsf:openshell_ocsf",
19+
"//crates/openshell-policy:openshell_policy",
20+
],
21+
proc_macro_deps = all_crate_deps(proc_macro = True),
22+
)
23+
24+
rust_test(
25+
name = "openshell_supervisor_process_test",
26+
crate = ":openshell_supervisor_process",
27+
deps = all_crate_deps(normal_dev = True),
28+
)

0 commit comments

Comments
 (0)