Skip to content

Commit 789a939

Browse files
committed
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]>
1 parent 8328412 commit 789a939

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

‎CONTRIBUTING.md‎

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,24 @@ Project requirements:
289289
- Docker (running)
290290
- Z3 solver library (for the policy prover crate)
291291

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+
292310
### macOS build tools
293311

294312
Install Apple Command Line Tools before building locally:
@@ -390,6 +408,26 @@ These are the primary `mise` tasks for day-to-day development:
390408
| `mise run helm:docs` | Regenerate the Helm chart README |
391409
| `mise run clean` | Clean build artifacts |
392410

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.
430+
393431
## Project Structure
394432

395433
| Path | Purpose |

0 commit comments

Comments
 (0)