Skip to content

Repository files navigation

Registry

Use

Add the registry to your project's .bazelrc, keeping the Bazel Central Registry as a fallback:

common --registry=file:///absolute/path/to/registry
common --registry=https://bcr.bazel.build

Replace the local path with an HTTPS URL when hosting the registry.

Develop

Install the version of Bazel in .bazelversion; it downloads all required toolchains and dependencies. Run commands from the repository root.

Task Command
Build and validate bazel build //...
Test bazel test //...
Format Rust bazel run //:format
Check formatting bazel run //:format -- --check
Cross-compilation and remote execution

Configured targets are macOS, Linux GNU, and Windows GNULLVM, each on x86-64 and ARM64. Run tests on the target platform. To cross-compile the validator:

bazel build //system/registry/command --platforms=@rules_rs//rs/platforms:x86_64-unknown-linux-gnu

For remote execution, set the executor, credentials, and worker platform in user.bazelrc, then run bazel test //... --config=remote. Match the execution platform to the worker's operating system, architecture, ABI, and service requirements.

Add a release

modules/<name>/
├── metadata.json
└── <version>/
    ├── MODULE.bazel
    ├── source.json
    ├── patches/
    └── overlay/

List the release in metadata.json under versions. Use HTTPS source archives with SHA-256, SHA-384, or SHA-512 integrity. Optional patches and overlays must match their declared checksums.

Validate with bazel build //:registry. This checks metadata, required files, and attachment integrity; source archives and module builds need separate verification before publication.

Nested BUILD or BUILD.bazel files create packages excluded from the root glob. Their packages must load successfully, export the files, and be referenced explicitly by the root target. Alternatively, supply those BUILD files through an archive or patch.

Update dependencies

Edit toolchain pins in MODULE.bazel or crate requirements in Cargo.toml, then refresh and verify:

bazel run //:update --config=refresh
bazel mod deps --config=refresh
bazel build //... --config=refresh
bazel test //...

Commit both lockfiles with the dependency changes: Cargo.lock and MODULE.bazel.lock.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages