You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 789a939
Browse filesBrowse the repository at this point in the historyBrowse files
docs: add experimental Bazel build commands to CONTRIBUTING.md
Document Bazel targets alongside existing mise commands with a prominent
experimental notice linking to RFC 0012. Includes Bazelisk install
instructions, .bazelignore guidance for Cargo coexistence, and a mapping
of available build and test targets.
Signed-off-by: Roland Huß <[email protected]>
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+38Lines changed: 38 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -289,6 +289,24 @@ Project requirements:
289
289
- Docker (running)
290
290
- Z3 solver library (for the policy prover crate)
291
291
292
+
### Optional: Bazel (experimental)
293
+
294
+
Install [Bazelisk](https://github.com/bazelbuild/bazelisk), which auto-downloads the Bazel version pinned in `.bazelversion`:
295
+
296
+
```bash
297
+
# macOS
298
+
brew install bazelisk
299
+
300
+
# npm (any platform)
301
+
npm install -g @bazel/bazelisk
302
+
```
303
+
304
+
Bazel builds Z3 from source, so no system Z3 installation is needed when using Bazel. If you have previously built with Cargo, add Cargo's output directory to `.bazelignore` to prevent conflicts:
305
+
306
+
```bash
307
+
echo"target">> .bazelignore
308
+
```
309
+
292
310
### macOS build tools
293
311
294
312
Install Apple Command Line Tools before building locally:
@@ -390,6 +408,26 @@ These are the primary `mise` tasks for day-to-day development:
390
408
|`mise run helm:docs`| Regenerate the Helm chart README |
391
409
|`mise run clean`| Clean build artifacts |
392
410
411
+
### Bazel targets (experimental)
412
+
413
+
> [!IMPORTANT]
414
+
> Bazel support is experimental and under evaluation via [RFC 0012](https://github.com/NVIDIA/OpenShell/pull/2543).
415
+
> It may be removed at any time depending on the RFC outcome.
416
+
> Feedback is welcome: [open an issue](https://github.com/NVIDIA/OpenShell/issues/new) or find us on CNCF Slack in [#openshell-dev](https://cloud-native.slack.com/archives/openshell-dev).
417
+
418
+
The following Bazel commands are available alongside the mise tasks above. Cargo and mise remain the primary build system.
419
+
420
+
| Task | Bazel command | Notes |
421
+
| ---- | ------------- | ----- |
422
+
| Build everything |`bazel build //...`| All crates and protos |
423
+
| Run all tests |`bazel test //...`| Unit tests only, no E2E |
424
+
| Build the CLI |`bazel build //crates/openshell-cli:openshell`||
425
+
| Build the gateway |`bazel build //crates/openshell-server:openshell-gateway`||
426
+
| Build the supervisor |`bazel build //crates/openshell-sandbox:openshell-sandbox-bin`||
427
+
| Clean |`bazel clean`||
428
+
429
+
Bazel does not yet cover `mise run gateway`, `mise run sandbox`, `mise run e2e`, `mise run docs`, or `mise run helm:docs`. Those are runtime and infrastructure tasks that remain with mise. Additional Bazel targets will be added over time as the experiment progresses.
0 commit comments