From ebc3926d044d4d852fbf5eaa0cc5c5bfbc3b9e0f Mon Sep 17 00:00:00 2001 From: Red Daly Date: Fri, 6 Nov 2026 12:35:16 -0800 Subject: [PATCH 1/3] feat(rust): add rust_runfile_library and the runfile runtime crate Adds the rules_runfile_codegen_rust module beside go/ and kotlin/. rust_runfile_library generates a crate with one pub static per entry: FileSpec, ExecutableSpec, DirectorySpec, or FileSetSpec from the new runfile crate (@rules_runfile_codegen_rust//runfile). Specs are const, so declaring them does no I/O. resolve() returns a Result and checks that the file exists; must_resolve() panics; resolve_with() takes a substitute Resolver for unit tests. Executable::command() returns a std::process::Command with RUNFILES_MANIFEST_FILE or RUNFILES_DIR set. Lookups go through @rules_rust//rust/runfiles. That crate has no env-vars helper, so the runtime crate derives the child variables from the environment and runfiles::find_runfiles_dir(). The core gains a rust emitter. It writes the layout rustfmt would pick, and file sets use a brace macro (runfile::file_set!) whose body rustfmt leaves alone. Every public item has a doc comment. Tests (tests/rust) mirror the Go suite and add: subprocess propagation, a negative control without the variables, a manifest-only re-run of the test binary, rustfmt --check on the generated source, and clippy with -Dwarnings -Dmissing_docs. examples/rust is wired into the README via devtool update-docs. Pinned to rules_rust 0.71.3 and Rust 1.88.0. Co-Authored-By: Claude Opus 5.5 --- .agents/AGENTS.md | 1 + .bcr/config.yml | 1 + .bcr/rust/metadata.template.json | 16 + .bcr/rust/presubmit.yml | 10 + .bcr/rust/source.template.json | 4 + .github/workflows/ci.yml | 2 +- DESIGN.md | 1 + LANGUAGE_SUPPORT.md | 107 ++--- README.md | 151 ++++++- core/internal/emitters/BUILD.bazel | 3 + core/internal/emitters/rust.bzl | 135 +++++++ core/internal/emitters/rust_test.bzl | 118 ++++++ core/internal/emitters/utils.bzl | 10 + core/internal/emitters/utils_test.bzl | 12 +- core/internal/rules.bzl | 9 +- examples/rust/BUILD.bazel | 53 +++ examples/rust/MODULE.bazel | 29 ++ examples/rust/MODULE.bazel.lock | 458 ++++++++++++++++++++++ examples/rust/data/dummy.txt | 1 + examples/rust/data/info.txt | 1 + examples/rust/helper.rs | 3 + examples/rust/main.rs | 28 ++ examples/rust/run_test.sh | 31 ++ rust/.bazelrc | 3 + rust/BUILD.bazel | 17 + rust/MODULE.bazel | 28 ++ rust/MODULE.bazel.lock | 461 ++++++++++++++++++++++ rust/defs.bzl | 166 ++++++++ rust/docs/BUILD.bazel | 17 + rust/docs/defs.md | 107 +++++ rust/runfile/BUILD.bazel | 23 ++ rust/runfile/runfile.rs | 478 +++++++++++++++++++++++ rust/runfile/runfile_test.rs | 142 +++++++ tests/rust/.bazelrc | 2 + tests/rust/BUILD.bazel | 256 ++++++++++++ tests/rust/MODULE.bazel | 33 ++ tests/rust/MODULE.bazel.lock | 458 ++++++++++++++++++++++ tests/rust/data/collection/file1.txt | 1 + tests/rust/data/collection/file2.txt | 1 + tests/rust/data/dummy.txt | 1 + tests/rust/data/helper_data.txt | 1 + tests/rust/format_test.rs | 23 ++ tests/rust/helper_bin.rs | 30 ++ tests/rust/integration_test.rs | 329 ++++++++++++++++ tests/rust/mock_repo/BUILD.bazel | 8 + tests/rust/mock_repo/MODULE.bazel | 4 + tests/rust/mock_repo/data/file1.txt | 1 + tests/rust/mock_repo/data/file2.txt | 1 + tests/rust/rules.bzl | 11 + tests/rust/subdir/BUILD.bazel | 19 + tests/rust/subdir/sub_data/file1.txt | 1 + tests/rust/subdir/sub_data/file2.txt | 1 + tools/cmd/devtool/bcr_validation_test.go | 2 +- tools/cmd/devtool/languages.go | 9 +- tools/cmd/devtool/test.go | 3 + tools/cmd/devtool/version.go | 10 +- 56 files changed, 3740 insertions(+), 91 deletions(-) create mode 100644 .bcr/rust/metadata.template.json create mode 100644 .bcr/rust/presubmit.yml create mode 100644 .bcr/rust/source.template.json create mode 100644 core/internal/emitters/rust.bzl create mode 100644 core/internal/emitters/rust_test.bzl create mode 100644 examples/rust/BUILD.bazel create mode 100644 examples/rust/MODULE.bazel create mode 100644 examples/rust/MODULE.bazel.lock create mode 100644 examples/rust/data/dummy.txt create mode 100644 examples/rust/data/info.txt create mode 100644 examples/rust/helper.rs create mode 100644 examples/rust/main.rs create mode 100755 examples/rust/run_test.sh create mode 100644 rust/.bazelrc create mode 100644 rust/BUILD.bazel create mode 100644 rust/MODULE.bazel create mode 100644 rust/MODULE.bazel.lock create mode 100644 rust/defs.bzl create mode 100644 rust/docs/BUILD.bazel create mode 100644 rust/docs/defs.md create mode 100644 rust/runfile/BUILD.bazel create mode 100644 rust/runfile/runfile.rs create mode 100644 rust/runfile/runfile_test.rs create mode 100644 tests/rust/.bazelrc create mode 100644 tests/rust/BUILD.bazel create mode 100644 tests/rust/MODULE.bazel create mode 100644 tests/rust/MODULE.bazel.lock create mode 100644 tests/rust/data/collection/file1.txt create mode 100644 tests/rust/data/collection/file2.txt create mode 100644 tests/rust/data/dummy.txt create mode 100644 tests/rust/data/helper_data.txt create mode 100644 tests/rust/format_test.rs create mode 100644 tests/rust/helper_bin.rs create mode 100644 tests/rust/integration_test.rs create mode 100644 tests/rust/mock_repo/BUILD.bazel create mode 100644 tests/rust/mock_repo/MODULE.bazel create mode 100644 tests/rust/mock_repo/data/file1.txt create mode 100644 tests/rust/mock_repo/data/file2.txt create mode 100644 tests/rust/rules.bzl create mode 100644 tests/rust/subdir/BUILD.bazel create mode 100644 tests/rust/subdir/sub_data/file1.txt create mode 100644 tests/rust/subdir/sub_data/file2.txt diff --git a/.agents/AGENTS.md b/.agents/AGENTS.md index 868fdaf..609c22b 100644 --- a/.agents/AGENTS.md +++ b/.agents/AGENTS.md @@ -8,6 +8,7 @@ * `core`: Core Starlark macros ([core/](file:///usr/local/google/home/reddaly/tcode/runfile-codegen/repo/core) directory). * `go`: Go binder generator, tests, and examples ([go/](file:///usr/local/google/home/reddaly/tcode/runfile-codegen/repo/go), `tests/go`, `examples/go`). * `kotlin`: Kotlin binder generator, tests, and examples ([kotlin/](file:///usr/local/google/home/reddaly/tcode/runfile-codegen/repo/kotlin), `tests/kotlin`, `examples/kotlin`). + * `rust`: Rust binder generator, runtime crate, tests, and examples (`rust/`, `tests/rust`, `examples/rust`). * `engprod`: Developer tools, CI/CD workflows, and repo-level configs ([tools/](file:///usr/local/google/home/reddaly/tcode/runfile-codegen/repo/tools), `.github/`). # Language and tone style rules diff --git a/.bcr/config.yml b/.bcr/config.yml index 482f27b..da464bd 100644 --- a/.bcr/config.yml +++ b/.bcr/config.yml @@ -2,3 +2,4 @@ moduleRoots: - core - go - kotlin + - rust diff --git a/.bcr/rust/metadata.template.json b/.bcr/rust/metadata.template.json new file mode 100644 index 0000000..91d320b --- /dev/null +++ b/.bcr/rust/metadata.template.json @@ -0,0 +1,16 @@ +{ + "name": "rules_runfile_codegen_rust", + "homepage": "https://github.com/meta-programming/rules_runfiles_codegen", + "maintainers": [ + { + "name": "Red Daly", + "email": "reddaly@gmail.com", + "github": "reddaly" + } + ], + "repository": [ + "github:meta-programming/rules_runfiles_codegen" + ], + "versions": [], + "yanked_versions": {} +} diff --git a/.bcr/rust/presubmit.yml b/.bcr/rust/presubmit.yml new file mode 100644 index 0000000..02c36c6 --- /dev/null +++ b/.bcr/rust/presubmit.yml @@ -0,0 +1,10 @@ +matrix: + platform: ["ubuntu2004", "macos", "windows"] + bazel: ["7.x", "8.x", "9.x"] +tasks: + verify_targets: + name: "Verify Rust targets" + platform: ${{ platform }} + bazel: ${{ bazel }} + build_targets: + - "@rules_runfile_codegen_rust//:defs_bzl" diff --git a/.bcr/rust/source.template.json b/.bcr/rust/source.template.json new file mode 100644 index 0000000..0c6e731 --- /dev/null +++ b/.bcr/rust/source.template.json @@ -0,0 +1,4 @@ +{ + "url": "https://github.com/meta-programming/rules_runfiles_codegen/releases/download/{TAG}/rules_runfiles_codegen-{VERSION}.tar.gz", + "strip_prefix": "rules_runfiles_codegen-{VERSION}/rust" +} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5dcd9b2..e025fbb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: tools/devtool update-docs --build=false # Verify no changes were made to README or Stardoc files - git diff --exit-code README.md go/docs/defs.md kotlin/docs/defs.md || ( + git diff --exit-code README.md go/docs/defs.md kotlin/docs/defs.md rust/docs/defs.md || ( echo "==============================================================================" echo " ERROR: Documentation is out of sync." echo " Please run the following command locally and commit the changes:" diff --git a/DESIGN.md b/DESIGN.md index b6eab90..4c45764 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -122,6 +122,7 @@ The project is designed to be fully compatible with publishing to the Bazel Cent * **`rules_runfile_codegen_core`**: The dependency-free core generator. * **`rules_runfile_codegen_go`**: The thin Go binder. * **`rules_runfile_codegen_kotlin`**: The thin Kotlin binder. +* **`rules_runfile_codegen_rust`**: The thin Rust binder and its `runfile` runtime crate. See [LANGUAGE_SUPPORT.md](LANGUAGE_SUPPORT.md#34-rust-implemented). By splitting the project into separate modules, we ensure that users only pull in the dependencies they need (e.g., Go users do not pull in Kotlin/Java toolchains), respecting **REQ-3 (Minimal Dependencies)**. diff --git a/LANGUAGE_SUPPORT.md b/LANGUAGE_SUPPORT.md index e73d1b0..ef0e3da 100644 --- a/LANGUAGE_SUPPORT.md +++ b/LANGUAGE_SUPPORT.md @@ -6,6 +6,8 @@ This document outlines the plan for extending `rules_runfile_codegen` to support ## 1. Overview & Core Principles +Go, Kotlin, and Rust are implemented. The other languages below are plans. + Regardless of the target language, all implementations should adhere to our core design principles: 1. **Type-Safety**: Expose runfiles as strongly-typed symbols, not raw strings. 2. **Explicit (Non-Eager) Resolution**: Evolve all language implementations towards an explicit, non-eager resolution model. Go is the first to implement this. While some languages (like Kotlin) may temporarily use eager resolution during transition, the long-term goal is to separate definition from resolution to improve testability and avoid startup side-effects. @@ -28,7 +30,7 @@ To generate code that resolves runfiles, we must rely on the runtime libraries p | **Java / Kotlin** | `@bazel_tools//tools/java/runfiles` | **Zero** (built into `@bazel_tools`) | **Zero** (compiled against local jar; Maven artifact `com.google.devtools.build:runfiles` exists but is optional for Bazel-only builds) | **Excellent** (`envVars()`) | **Excellent** | | **Python** | `@rules_python//python/runfiles` | **Zero** (part of `rules_python`) | **Zero** (distributed as source within `rules_python`, no `pip` package needed) | **Excellent** (`EnvVars()`) | **Excellent** | | **C++** | `@bazel_tools//tools/cpp/runfiles` | **Zero** (built into `@bazel_tools`) | **Zero** (header-only/local library) | **Excellent** (`EnvVars()`) | **Excellent** | -| **Rust** | `runfiles` (crate from `rules_rust`) | **Zero** (part of `rules_rust`) | **Optional** (crate `runfiles` exists on crates.io, but Bazel resolves it internally via `@rules_rust//tools/runfiles`) | **Good** (`env_vars()`) | **Good** | +| **Rust** (implemented) | `runfiles` (crate from `rules_rust`) | **Zero** (part of `rules_rust`) | **Optional** (crate `runfiles` exists on crates.io, but Bazel resolves it internally via `@rules_rust//rust/runfiles`) | **Partial** (no env helper; `rules_runfile_codegen_rust` computes the variables) | **Good** | | **TypeScript / JS** | `@bazel/runfiles` | **Medium** (requires `rules_js` setup) | **Required** (must add `@bazel/runfiles` to `package.json`) | **Good** (`envVars()`) | **Good** | --- @@ -340,17 +342,16 @@ public final class MyResources { --- -### 3.4. Rust +### 3.4. Rust (implemented) -Rust uses `rules_rust` and the official `runfiles` crate. +Rust support is the `rules_runfile_codegen_rust` module. It uses `rules_rust` and its `runfiles` crate (`@rules_rust//rust/runfiles`) for every lookup. -#### BUILD.bazel Usage: +#### BUILD.bazel usage: ```python -load("@rules_runfile_codegen_rust//rust:defs.bzl", "rust_runfile_library", "rust_runfile") +load("@rules_runfile_codegen_rust//:defs.bzl", "rust_runfile_library", "rust_runfile") rust_runfile_library( - name = "my_resources", - # Generates a module named my_resources + name = "my_resources", # Also the crate name, unless crate_name is set. entries = [ rust_runfile( name = "CONFIG_JSON", @@ -366,82 +367,34 @@ rust_runfile_library( ) ``` -#### Proposed Rust API Sketch: -Rust does not support life before `main()` (no static constructors) without external crates. To keep dependencies minimal and idiomatic, we use `std::sync::OnceLock` for thread-safe lazy initialization, but we can also provide an explicit `validate()` function that users can call at the beginning of `main()` if they want to enforce eager startup checks. - -```rust -// my_resources.rs -use std::path::{Path, PathBuf}; -use std::process::Command; -use std::sync::OnceLock; -use runfiles::Runfiles; - -static RUNFILES: OnceLock = OnceLock::new(); - -fn get_runfiles() -> &'static Runfiles { - RUNFILES.get_or_init(|| { - Runfiles::create().expect("FATAL: Failed to initialize runfiles registry") - }) -} - -fn resolve(rlocation_path: &str) -> PathBuf { - get_runfiles() - .rlocation(rlocation_path) - .unwrap_or_else(|| panic!("FATAL: Failed to resolve runfile: {}", rlocation_path)) -} +#### Generated code -pub struct Runfile { - rlocation_path: &'static str, - abs_path: OnceLock, -} +The generated crate has one `pub static` per entry. Each static is a spec from the `runfile` runtime crate (`@rules_runfile_codegen_rust//runfile`) and is built with a `const fn`, so declaring it does no I/O: -impl Runfile { - const fn new(rlocation_path: &'static str) -> Self { - Self { - rlocation_path, - abs_path: OnceLock::new(), - } - } - - pub fn path(&self) -> &Path { - self.abs_path.get_or_init(|| resolve(self.rlocation_path)) - } -} +```rust +/// A configuration file. +/// +/// Source: `//path/to:config.json` +pub static CONFIG_JSON: runfile::FileSpec = runfile::FileSpec::new("_main/path/to/config.json"); + +/// A helper tool. +/// +/// Source: `//path/to/tools:helper` +pub static HELPER_TOOL: runfile::ExecutableSpec = + runfile::ExecutableSpec::new("_main/path/to/tools/helper"); +``` -pub struct ExecutableRunfile { - runfile: Runfile, -} +File sets use the `runfile::file_set! { "rel" => "rlocation", }` macro. The emitter writes the layout `rustfmt` would choose. `rustfmt` leaves the body of a brace-delimited macro alone, so the macro keeps file sets stable. Every public item has a doc comment. The tests check the output with `rustfmt --check` and with clippy at `-Dwarnings -Dmissing_docs`. -impl ExecutableRunfile { - const fn new(rlocation_path: &'static str) -> Self { - Self { - runfile: Runfile::new(rlocation_path), - } - } +#### Runtime API - pub fn path(&self) -> &Path { - self.runfile.path() - } +* `resolve()` returns `Result`. It fails if the runfiles cannot be found or the file does not exist. The existence check matters because the `runfiles` crate returns a path for any lookup in directory mode. +* `must_resolve()` panics with the same error. +* `resolve_with(&dyn Resolver)` takes a substitute resolver for unit tests. +* `Executable::command()` returns a `std::process::Command`. It sets `RUNFILES_MANIFEST_FILE`, or `RUNFILES_DIR` and `JAVA_RUNFILES`, as absolute paths. The `runfiles` crate has no function that returns these variables, so the runtime crate computes them from the environment and from `runfiles::find_runfiles_dir()`. +* Generated rlocation paths are canonical (`_main/...`, `rules_foo+/...`), so lookups skip repository mapping. - pub fn cmd(&self) -> Command { - let mut cmd = Command::new(self.path()); - for (k, v) in get_runfiles().env_vars() { - cmd.env(k, v); - } - cmd - } -} - -// Generated symbols -pub static CONFIG_JSON: Runfile = Runfile::new("_main/path/to/config.json"); -pub static HELPER_TOOL: ExecutableRunfile = ExecutableRunfile::new("_main/path/to/helper"); - -/// Optional: Eager validation helper that users can call in main() -pub fn validate() { - let _ = CONFIG_JSON.path(); - let _ = HELPER_TOOL.path(); -} -``` +The runtime crate uses `std::fs` and `std::process`. It is for binaries and tests, not for `wasm32-unknown-unknown` targets. --- diff --git a/README.md b/README.md index 260c519..728e5ed 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ For complete, runnable projects demonstrating these quickstarts, see the [exampl ## Key Features * **Type-Safety**: Runfiles are exposed as generated constants/properties. No more stringly-typed paths. -* **Explicit Resolution**: Both Go and Kotlin use an explicit, non-eager (lazy) resolution model to avoid startup side-effects and improve testability. The generated libraries expose unresolved specifications (e.g. `FileSpec`) that must be explicitly resolved at runtime. +* **Explicit Resolution**: Go, Kotlin, and Rust use an explicit, non-eager (lazy) resolution model to avoid startup side-effects and improve testability. The generated libraries expose unresolved specifications (e.g. `FileSpec`) that must be explicitly resolved at runtime. * **Subprocess Environment Propagation**: Executable runfiles are wrapped in rich objects that facilitate launching them as subprocesses while automatically propagating the Bazel runfiles environment. This ensures that child processes can also resolve their own runfiles.[^1] * **Zero Runtime Overhead**: After successful startup-time resolution, accessing the runfile path is a simple member access with zero overhead. @@ -348,16 +348,159 @@ object Resources { --- +## Rust Quickstart + +### Bzlmod Setup + +To use these rules in your Rust project, add the following to your `MODULE.bazel` file. The module needs [rules_rust](https://github.com/bazelbuild/rules_rust) with a registered Rust toolchain. + + +```bazel +# MODULE.bazel +bazel_dep(name = "rules_runfile_codegen_rust", version = "0.1.2") +``` + + +### 1. Define the Runfile Library + +Define a `rust_runfile_library` in your `BUILD.bazel` file. It generates a crate, named after the target, with one `pub static` per entry. Static names are upper snake case. + + +```bazel +load("@rules_runfile_codegen_rust//:defs.bzl", "rust_runfile", "rust_runfile_library") +load("@rules_rust//rust:defs.bzl", "rust_binary") + +package(default_visibility = ["//visibility:private"]) + +# A helper binary to demonstrate executable runfiles +rust_binary( + name = "helper", + srcs = ["helper.rs"], +) + +# Generate the runfile accessor crate +rust_runfile_library( + name = "resources", + entries = [ + rust_runfile( + name = "DATA_FILE", + target = "data/dummy.txt", + doc = "A dummy data file.", + ), + rust_runfile( + name = "HELPER_TOOL", + target = ":helper", + doc = "A helper tool executable.", + ), + rust_runfile( + name = "EXAMPLE_SET", + targets = ["data/dummy.txt", "data/info.txt"], + base = "common_dir", + doc = "A set of example data files.", + ), + ], +) + +# Use the crate in a binary +rust_binary( + name = "main", + srcs = ["main.rs"], + deps = [ + ":resources", + ], +) +# # +``` + + +### 2. Use the Generated Symbols in Rust + +Each static is an unresolved spec (`FileSpec`, `ExecutableSpec`, `DirectorySpec`, or `FileSetSpec`) from the `runfile` crate. Call `resolve()` to get a `Result`, or `must_resolve()` to panic if the runfile is missing. `command()` on a resolved executable returns a `std::process::Command` that passes `RUNFILES_DIR` or `RUNFILES_MANIFEST_FILE` to the child. Lookups use the [`runfiles` crate from rules_rust](https://github.com/bazelbuild/rules_rust/tree/main/rust/runfiles), so they work with a runfiles directory or with a manifest only. + + +```rust +use std::process::ExitCode; + +fn main() -> ExitCode { + // 1. Resolve a runfile, handling the error. + let data_file = match resources::DATA_FILE.resolve() { + Ok(file) => file, + Err(err) => { + eprintln!("Error resolving runfile: {err}"); + return ExitCode::FAILURE; + } + }; + let content = std::fs::read_to_string(data_file.path()).expect("read data file"); + println!("Data: {content}"); + + // 2. Run an executable runfile with the runfiles environment (fail-fast). + let helper = resources::HELPER_TOOL.must_resolve(); + let output = helper.command().output().expect("run helper"); + print!("Helper output: {}", String::from_utf8_lossy(&output.stdout)); + + // 3. Access a set of runfiles by relative path. + let example_set = resources::EXAMPLE_SET.must_resolve(); + let paths: Vec<_> = example_set.rel_paths().collect(); + println!("FileSet paths: {paths:?}"); + let dummy = example_set.must_file("dummy.txt"); + let dummy_content = std::fs::read_to_string(dummy.path()).expect("read dummy.txt"); + println!("FileSet dummy content: {}", dummy_content.trim()); + ExitCode::SUCCESS +} +``` + + +In unit tests, pass your own `runfile::Resolver` to `resolve_with()` instead of `resolve()`. + +The `runfile` crate reads the file system, so it does not build for `wasm32-unknown-unknown`. Use it in binaries and tests, not in browser code. + +### Actual Generated Rust Code + +
+Click to view the actual generated Rust code for the example above + +```rust +// Code generated by rules_runfile_codegen. DO NOT EDIT. + +//! Typed accessors for the Bazel runfiles of `//:resources`. +//! +//! Each static is an unresolved spec from the `runfile` crate. Call +//! `resolve()` to find the runfile on disk, or `must_resolve()` to panic if +//! it is missing. + +/// A dummy data file. +/// +/// Source: `//:data/dummy.txt` +pub static DATA_FILE: runfile::FileSpec = runfile::FileSpec::new("_main/data/dummy.txt"); + +/// A set of example data files. +/// +/// Source: `//:data/dummy.txt, //:data/info.txt` +pub static EXAMPLE_SET: runfile::FileSetSpec = runfile::file_set! { + "dummy.txt" => "_main/data/dummy.txt", + "info.txt" => "_main/data/info.txt", +}; + +/// A helper tool executable. +/// +/// Source: `//:helper` +pub static HELPER_TOOL: runfile::ExecutableSpec = runfile::ExecutableSpec::new("_main/helper"); +``` + +
+ +--- + ## Design Philosophy ### Explicit (Non-Eager) Resolution -Both Go and Kotlin use an explicit, non-eager (lazy) resolution model. +Go, Kotlin, and Rust use an explicit, non-eager (lazy) resolution model. * **Why?** Eager resolution (resolving everything during module initialization or `init` blocks) can cause dangerous side-effects, makes unit testing and mocking difficult, and violates best practices. -* **How it works**: The generated code defines unresolved specifications (`FileSpec`, `ExecutableSpec`, `DirectorySpec`, `FileSetSpec`). Because runfile resolution can fail at runtime (e.g., if a data dependency is missing from the runfiles manifest), resolution is explicit and fallible. The developer must call `.Resolve()` (Go, which returns an error) or `.resolve()` (Kotlin, which throws a `RunfileResolutionException`) at runtime to obtain the resolved runfile reference. Go also provides `.MustResolve()` which panics on failure for cases where missing runfiles should be immediately fatal. This avoids initialization-time side-effects, handles failures gracefully, and allows injecting mock resolvers for testing. +* **How it works**: The generated code defines unresolved specifications (`FileSpec`, `ExecutableSpec`, `DirectorySpec`, `FileSetSpec`). Because runfile resolution can fail at runtime (e.g., if a data dependency is missing from the runfiles manifest), resolution is explicit and fallible. The developer must call `.Resolve()` (Go, which returns an error), `.resolve()` (Kotlin, which throws a `RunfileResolutionException`), or `.resolve()` (Rust, which returns a `Result`) at runtime to obtain the resolved runfile reference. Go and Rust also provide `.MustResolve()` and `.must_resolve()`, which panic on failure for cases where missing runfiles should be immediately fatal. This avoids initialization-time side-effects, handles failures gracefully, and allows injecting mock resolvers for testing. ### Rich Object Wrapper Rather than just returning raw string paths, the generators wrap runfiles in rich objects (`Runfile` and `ExecutableRunfile`). * This allows us to attach helper methods (like `jvmPath` in Kotlin to get a native `java.nio.file.Path` object). -* Crucially, it allows us to distinguish **executables** and provide safe execution wrappers (`Cmd` in Go, `processBuilder` in Kotlin) that automatically handle the propagation of Bazel runfiles environment variables. This solves the common "nested runfiles" problem where a tool run from a test cannot find its own dependencies. +* Crucially, it allows us to distinguish **executables** and provide safe execution wrappers (`Cmd` in Go, `processBuilder` in Kotlin, `command` in Rust) that automatically handle the propagation of Bazel runfiles environment variables. This solves the common "nested runfiles" problem where a tool run from a test cannot find its own dependencies. [^1]: Bazel runfiles discovery relies on environment variables like `RUNFILES_DIR` (path to the runfiles directory) and `RUNFILES_MANIFEST_FILE` (path to the manifest file mapping runfile paths to their physical locations, used when symlinks are not available, e.g., on Windows). If these variables are not propagated to child processes, those processes will fail to resolve their own runfiles. For details, see the [Bazel Runfiles Guide](https://bazel.build/extending/rules#runfiles) and the [Bazel Runfiles Library specification](https://github.com/bazelbuild/bazel/blob/master/tools/cpp/runfiles/runfiles_src.h). diff --git a/core/internal/emitters/BUILD.bazel b/core/internal/emitters/BUILD.bazel index 4c3e2cd..dad566d 100644 --- a/core/internal/emitters/BUILD.bazel +++ b/core/internal/emitters/BUILD.bazel @@ -1,4 +1,5 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library") +load("//internal/emitters:rust_test.bzl", "rust_test_suite") load("//internal/emitters:template_test.bzl", "template_test_suite") load("//internal/emitters:utils_test.bzl", "utils_test_suite") @@ -9,6 +10,7 @@ bzl_library( srcs = [ "go.bzl", "kotlin.bzl", + "rust.bzl", "template.bzl", "utils.bzl", ], @@ -17,3 +19,4 @@ bzl_library( template_test_suite(name = "template_tests") utils_test_suite(name = "utils_tests") +rust_test_suite(name = "rust_tests") diff --git a/core/internal/emitters/rust.bzl b/core/internal/emitters/rust.bzl new file mode 100644 index 0000000..d173c0b --- /dev/null +++ b/core/internal/emitters/rust.bzl @@ -0,0 +1,135 @@ +# Rust code emitter for rules_runfile_codegen. +load("//internal/emitters:template.bzl", "render") +load("//internal/emitters:utils.bzl", "escape_rust_string") + +# rustfmt's default max_width. See +# https://rust-lang.github.io/rustfmt/?version=v1&search=#max_width. +_MAX_WIDTH = 100 +_INDENT = " " + +def _header_part(label): + return render( + """// Code generated by rules_runfile_codegen. DO NOT EDIT. + +//! Typed accessors for the Bazel runfiles of `{{label}}`. +//! +//! Each static is an unresolved spec from the `runfile` crate. Call +//! `resolve()` to find the runfile on disk, or `must_resolve()` to panic if +//! it is missing.""", + label = label, + ) + +def _validate_identifier(name, label): + """Fails unless `name` is an upper snake case Rust identifier. + + Rust names statics in upper snake case, and rustc warns on other names + (the `non_upper_case_globals` lint). See + https://doc.rust-lang.org/reference/identifiers.html. + """ + if not name: + fail("Runfile name cannot be empty in '%s'." % label) + if not (name[0].isupper() and name[0].isalpha()): + fail("Runfile name '%s' in '%s' must start with an uppercase letter, for example CONFIG_JSON." % (name, label)) + for char in name.elems(): + if not (char.isupper() or char.isdigit() or char == "_"): + fail("Runfile name '%s' in '%s' must be upper snake case (A-Z, 0-9 and _), for example CONFIG_JSON." % (name, label)) + +def _display_label(label): + """Drops the `@@` main repository prefix from labels, for readability.""" + return ", ".join([ + part[2:] if part.startswith("@@//") else part + for part in label.split(", ") + ]) + +def _doc_lines(entry): + lines = [] + doc = entry["doc"].strip() + if doc: + for line in doc.split("\n"): + line = line.rstrip() + lines.append("/// " + line if line else "///") + else: + lines.append("/// Runfile for `%s`." % _display_label(entry["label"])) + lines.append("///") + lines.append("/// Source: `%s`" % _display_label(entry["label"])) + return lines + +def _spec_statement(name, spec_type, rlocation_path): + """Formats `pub static NAME: T = T::new("path");` the way rustfmt does. + + rustfmt keeps the statement on one line if it fits. Otherwise it breaks + after `=`, and if the call still does not fit, it moves the argument to + its own line. A string literal that fits nowhere is left as written. + """ + head = "pub static %s: %s =" % (name, spec_type) + call = '%s::new("%s");' % (spec_type, escape_rust_string(rlocation_path)) + one_line = head + " " + call + if len(one_line) <= _MAX_WIDTH: + return one_line + if len(_INDENT) + len(call) <= _MAX_WIDTH: + return head + "\n" + _INDENT + call + arg = '"%s",' % escape_rust_string(rlocation_path) + open_call = "%s %s::new(" % (head, spec_type) + if len(open_call) <= _MAX_WIDTH and len(_INDENT) + len(arg) <= _MAX_WIDTH: + return "\n".join([open_call, _INDENT + arg, ");"]) + return one_line + +def _file_set_statement(name, files): + """Formats a `file_set!` static. + + rustfmt does not reformat the body of a macro called with braces, so + only the first line has to match rustfmt. + """ + head = "pub static %s: runfile::FileSetSpec =" % name + first = head + " runfile::file_set! {" + if len(first) > _MAX_WIDTH: + first = "pub static %s:\n%srunfile::FileSetSpec = runfile::file_set! {" % (name, _INDENT) + lines = [first] + for rel, rlocation_path in sorted(files.items()): + lines.append('%s"%s" => "%s",' % (_INDENT, escape_rust_string(rel), escape_rust_string(rlocation_path))) + lines.append("};") + return "\n".join(lines) + +def emit_rust(entries, label): + """Generates the Rust source of a runfiles crate. + + The output is formatted as `rustfmt` would format it with default + settings, and each public item has a doc comment. + + Args: + entries: A list of dicts representing the runfile entries, as + returned by `analyze_entries`. Each dict must contain: + - "name": The static's name, in upper snake case. + - "runfile_path": The canonical rlocation path of the runfile. + - "is_executable": Whether the target is executable. + - "is_directory": Whether the target is a directory. + - "is_collection": Whether the entry is a file set. + - "collection_files": For a file set, relative path to + rlocation path. + - "doc": Optional documentation for the static. + - "label": The Bazel labels of the targets. + label: The label of the `rust_runfile_library`, used in the crate + docs. + + Returns: + A string containing the complete Rust source. + """ + blocks = [_header_part(_display_label(label))] + for entry in entries: + name = entry["name"] + _validate_identifier(name, entry["label"]) + + if entry["is_collection"]: + statement = _file_set_statement(name, entry["collection_files"]) + else: + if entry["is_executable"]: + spec_type = "runfile::ExecutableSpec" + elif entry["is_directory"]: + spec_type = "runfile::DirectorySpec" + else: + spec_type = "runfile::FileSpec" + statement = _spec_statement(name, spec_type, entry["runfile_path"]) + + blocks.append("\n".join(_doc_lines(entry) + [statement])) + + return "\n\n".join(blocks) + "\n" diff --git a/core/internal/emitters/rust_test.bzl b/core/internal/emitters/rust_test.bzl new file mode 100644 index 0000000..f07939f --- /dev/null +++ b/core/internal/emitters/rust_test.bzl @@ -0,0 +1,118 @@ +load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest") +load("//internal/emitters:rust.bzl", "emit_rust") + +def _entry(name, runfile_path, doc = "", is_executable = False, is_directory = False, collection_files = None): + return { + "name": name, + "runfile_path": runfile_path, + "is_executable": is_executable, + "is_directory": is_directory, + "is_collection": collection_files != None, + "collection_files": collection_files or {}, + "doc": doc, + "label": "//pkg:target", + } + +def _body(entries): + """Returns the emitted source after the crate docs.""" + code = emit_rust(entries, "//pkg:lib") + return code[code.index("\n\n///") + 2:] + +def _spec_layout_test_impl(ctx): + env = unittest.begin(ctx) + + # Each expected layout below was checked with `rustfmt --check`. + asserts.equals( + env, + """/// A file. +/// +/// Source: `//pkg:target` +pub static A: runfile::FileSpec = runfile::FileSpec::new("_main/data/dummy.txt"); +""", + _body([_entry("A", "_main/data/dummy.txt", doc = "A file.")]), + ) + + # Too long for one line: break after `=`. + asserts.equals( + env, + """/// Runfile for `//pkg:target`. +/// +/// Source: `//pkg:target` +pub static HELPER_TOOL_BINARY: runfile::ExecutableSpec = + runfile::ExecutableSpec::new("_main/tools/helper/helper_tool"); +""", + _body([_entry("HELPER_TOOL_BINARY", "_main/tools/helper/helper_tool", is_executable = True)]), + ) + + # Too long after `=`: the argument gets its own line. + long_path = "_main/" + "a" * 80 + ".txt" + asserts.equals( + env, + """/// Runfile for `//pkg:target`. +/// +/// Source: `//pkg:target` +pub static DIR: runfile::DirectorySpec = runfile::DirectorySpec::new( + "%s", +); +""" % long_path, + _body([_entry("DIR", long_path, is_directory = True)]), + ) + + # Too long anywhere: rustfmt leaves the line as written. + longer_path = "_main/" + "a" * 100 + ".txt" + asserts.equals( + env, + """/// Runfile for `//pkg:target`. +/// +/// Source: `//pkg:target` +pub static F: runfile::FileSpec = runfile::FileSpec::new("%s"); +""" % longer_path, + _body([_entry("F", longer_path)]), + ) + return unittest.end(env) + +def _file_set_test_impl(ctx): + env = unittest.begin(ctx) + asserts.equals( + env, + """/// Two files. +/// +/// Source: `//pkg:target` +pub static SET: runfile::FileSetSpec = runfile::file_set! { + "a.txt" => "_main/data/a.txt", + "b.txt" => "_main/data/b.txt", +}; +""", + _body([_entry("SET", "_main/data", doc = "Two files.", collection_files = { + "b.txt": "_main/data/b.txt", + "a.txt": "_main/data/a.txt", + })]), + ) + return unittest.end(env) + +def _doc_test_impl(ctx): + env = unittest.begin(ctx) + asserts.equals( + env, + """/// First line. +/// +/// Third line with "quotes". +/// +/// Source: `//pkg:target` +pub static A: runfile::FileSpec = runfile::FileSpec::new("_main/a\\"b"); +""", + _body([_entry("A", "_main/a\"b", doc = "First line.\n\nThird line with \"quotes\". \n")]), + ) + return unittest.end(env) + +spec_layout_test = unittest.make(_spec_layout_test_impl) +file_set_test = unittest.make(_file_set_test_impl) +doc_test = unittest.make(_doc_test_impl) + +def rust_test_suite(name): + unittest.suite( + name, + spec_layout_test, + file_set_test, + doc_test, + ) diff --git a/core/internal/emitters/utils.bzl b/core/internal/emitters/utils.bzl index 10aa7f4..f5ef3e5 100644 --- a/core/internal/emitters/utils.bzl +++ b/core/internal/emitters/utils.bzl @@ -34,3 +34,13 @@ def sanitize_kdoc(doc): """ # Replace */ with * / to prevent early termination of the block comment return doc.replace("*/", "* /") + +def escape_rust_string(s): + """Escapes a string for use in a double-quoted Rust string literal. + + According to the Rust Reference on string literals + (https://doc.rust-lang.org/reference/tokens.html#string-literals), + backslashes and double quotes must be escaped (\\\\ and \\\"). Runfile + paths do not contain newlines, so no other escapes are needed. + """ + return s.replace("\\", "\\\\").replace('"', '\\"') diff --git a/core/internal/emitters/utils_test.bzl b/core/internal/emitters/utils_test.bzl index 589c2f2..1638300 100644 --- a/core/internal/emitters/utils_test.bzl +++ b/core/internal/emitters/utils_test.bzl @@ -1,5 +1,5 @@ load("@bazel_skylib//lib:unittest.bzl", "asserts", "unittest") -load("//internal/emitters:utils.bzl", "escape_go_string", "escape_kotlin_string", "sanitize_kdoc") +load("//internal/emitters:utils.bzl", "escape_go_string", "escape_kotlin_string", "escape_rust_string", "sanitize_kdoc") def _escape_go_string_test_impl(ctx): env = unittest.begin(ctx) @@ -16,6 +16,14 @@ def _escape_kotlin_string_test_impl(ctx): asserts.equals(env, "foo\\$bar", escape_kotlin_string("foo$bar")) return unittest.end(env) +def _escape_rust_string_test_impl(ctx): + env = unittest.begin(ctx) + asserts.equals(env, "foo", escape_rust_string("foo")) + asserts.equals(env, "foo\\\\bar", escape_rust_string("foo\\bar")) + asserts.equals(env, "foo\\\"bar", escape_rust_string("foo\"bar")) + asserts.equals(env, "foo{}$bar", escape_rust_string("foo{}$bar")) + return unittest.end(env) + def _sanitize_kdoc_test_impl(ctx): env = unittest.begin(ctx) asserts.equals(env, "foo", sanitize_kdoc("foo")) @@ -24,6 +32,7 @@ def _sanitize_kdoc_test_impl(ctx): escape_go_string_test = unittest.make(_escape_go_string_test_impl) escape_kotlin_string_test = unittest.make(_escape_kotlin_string_test_impl) +escape_rust_string_test = unittest.make(_escape_rust_string_test_impl) sanitize_kdoc_test = unittest.make(_sanitize_kdoc_test_impl) def utils_test_suite(name): @@ -31,5 +40,6 @@ def utils_test_suite(name): name, escape_go_string_test, escape_kotlin_string_test, + escape_rust_string_test, sanitize_kdoc_test, ) diff --git a/core/internal/rules.bzl b/core/internal/rules.bzl index 81e365a..7ef3822 100644 --- a/core/internal/rules.bzl +++ b/core/internal/rules.bzl @@ -3,6 +3,7 @@ load("//internal:analyzer.bzl", "analyze_entries") load("//internal/emitters:go.bzl", "emit_go") load("//internal/emitters:kotlin.bzl", "emit_kotlin") +load("//internal/emitters:rust.bzl", "emit_rust") def _runfile_codegen_impl(ctx): language = ctx.attr.language @@ -32,6 +33,12 @@ def _runfile_codegen_impl(ctx): elif language == "kotlin": ext = "kt" code = emit_kotlin(ctx.attr.package, entries, ctx.attr.object_name, str(ctx.label)) + elif language == "rust": + ext = "rs" + library_label = str(ctx.label) + if library_label.endswith("_codegen"): + library_label = library_label[:-len("_codegen")] + code = emit_rust(entries, library_label) else: fail("Unsupported language: %s" % language) @@ -47,7 +54,7 @@ runfile_codegen = rule( implementation = _runfile_codegen_impl, attrs = { "package": attr.string(mandatory = True), - "language": attr.string(mandatory = True, values = ["go", "kotlin"]), + "language": attr.string(mandatory = True, values = ["go", "kotlin", "rust"]), "targets": attr.label_list(mandatory = True, allow_files = True, providers = [DefaultInfo]), "config": attr.string(mandatory = True), # Serialized JSON config "object_name": attr.string(), # Optional, only used/required for Kotlin diff --git a/examples/rust/BUILD.bazel b/examples/rust/BUILD.bazel new file mode 100644 index 0000000..ce459ed --- /dev/null +++ b/examples/rust/BUILD.bazel @@ -0,0 +1,53 @@ +# # [START quickstart] +load("@rules_runfile_codegen_rust//:defs.bzl", "rust_runfile", "rust_runfile_library") +load("@rules_rust//rust:defs.bzl", "rust_binary") + +package(default_visibility = ["//visibility:private"]) + +# A helper binary to demonstrate executable runfiles +rust_binary( + name = "helper", + srcs = ["helper.rs"], +) + +# Generate the runfile accessor crate +rust_runfile_library( + name = "resources", + entries = [ + rust_runfile( + name = "DATA_FILE", + target = "data/dummy.txt", + doc = "A dummy data file.", + ), + rust_runfile( + name = "HELPER_TOOL", + target = ":helper", + doc = "A helper tool executable.", + ), + rust_runfile( + name = "EXAMPLE_SET", + targets = ["data/dummy.txt", "data/info.txt"], + base = "common_dir", + doc = "A set of example data files.", + ), + ], +) + +# Use the crate in a binary +rust_binary( + name = "main", + srcs = ["main.rs"], + deps = [ + ":resources", + ], +) +# # [END quickstart] + +# Test to ensure the example runs and works +load("@rules_shell//shell:sh_test.bzl", "sh_test") + +sh_test( + name = "example_test", + srcs = ["run_test.sh"], + data = [":main"], +) diff --git a/examples/rust/MODULE.bazel b/examples/rust/MODULE.bazel new file mode 100644 index 0000000..b4772eb --- /dev/null +++ b/examples/rust/MODULE.bazel @@ -0,0 +1,29 @@ +module( + name = "rules_runfile_codegen_example_rust", + version = "0.0.0", +) + +bazel_dep(name = "rules_rust", version = "0.71.3") +bazel_dep(name = "rules_shell", version = "0.6.1") + +rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") +rust.toolchain( + edition = "2021", + versions = ["1.88.0"], +) +use_repo(rust, "rust_toolchains") + +register_toolchains("@rust_toolchains//:all") + +# Local overrides to use the current repo's modules +bazel_dep(name = "rules_runfile_codegen_core", version = "0.0.0") +local_path_override( + module_name = "rules_runfile_codegen_core", + path = "../../core", +) + +bazel_dep(name = "rules_runfile_codegen_rust", version = "0.0.0") +local_path_override( + module_name = "rules_runfile_codegen_rust", + path = "../../rust", +) diff --git a/examples/rust/MODULE.bazel.lock b/examples/rust/MODULE.bazel.lock new file mode 100644 index 0000000..0e38632 --- /dev/null +++ b/examples/rust/MODULE.bazel.lock @@ -0,0 +1,458 @@ +{ + "lockFileVersion": 28, + "registryFileHashes": { + "https://bcr.bazel.build/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497", + "https://bcr.bazel.build/modules/abseil-cpp/20210324.2/MODULE.bazel": "7cd0312e064fde87c8d1cd79ba06c876bd23630c83466e9500321be55c96ace2", + "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/MODULE.bazel": "70390338f7a5106231d20620712f7cccb659cd0e9d073d1991c038eb9fc57589", + "https://bcr.bazel.build/modules/abseil-cpp/20230125.1/MODULE.bazel": "89047429cb0207707b2dface14ba7f8df85273d484c2572755be4bab7ce9c3a0", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.0.bcr.1/MODULE.bazel": "1c8cec495288dccd14fdae6e3f95f772c1c91857047a098fad772034264cc8cb", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.0/MODULE.bazel": "d253ae36a8bd9ee3c5955384096ccb6baf16a1b1e93e858370da0a3b94f77c16", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.1/MODULE.bazel": "fa92e2eb41a04df73cdabeec37107316f7e5272650f81d6cc096418fe647b915", + "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/MODULE.bazel": "37bcdb4440fbb61df6a1c296ae01b327f19e9bb521f9b8e26ec854b6f97309ed", + "https://bcr.bazel.build/modules/abseil-cpp/20240116.2/MODULE.bazel": "73939767a4686cd9a520d16af5ab440071ed75cec1a876bf2fcfaf1f71987a16", + "https://bcr.bazel.build/modules/abseil-cpp/20250127.1/MODULE.bazel": "c4a89e7ceb9bf1e25cf84a9f830ff6b817b72874088bf5141b314726e46a57c1", + "https://bcr.bazel.build/modules/abseil-cpp/20250512.1/MODULE.bazel": "d209fdb6f36ffaf61c509fcc81b19e81b411a999a934a032e10cd009a0226215", + "https://bcr.bazel.build/modules/abseil-cpp/20250814.1/MODULE.bazel": "51f2312901470cdab0dbdf3b88c40cd21c62a7ed58a3de45b365ddc5b11bcab2", + "https://bcr.bazel.build/modules/abseil-cpp/20250814.1/source.json": "cea3901d7e299da7320700abbaafe57a65d039f10d0d7ea601c4a66938ea4b0c", + "https://bcr.bazel.build/modules/apple_support/1.11.1/MODULE.bazel": "1843d7cd8a58369a444fc6000e7304425fba600ff641592161d9f15b179fb896", + "https://bcr.bazel.build/modules/apple_support/1.15.1/MODULE.bazel": "a0556fefca0b1bb2de8567b8827518f94db6a6e7e7d632b4c48dc5f865bc7c85", + "https://bcr.bazel.build/modules/apple_support/1.21.0/MODULE.bazel": "ac1824ed5edf17dee2fdd4927ada30c9f8c3b520be1b5fd02a5da15bc10bff3e", + "https://bcr.bazel.build/modules/apple_support/1.21.1/MODULE.bazel": "5809fa3efab15d1f3c3c635af6974044bac8a4919c62238cce06acee8a8c11f1", + "https://bcr.bazel.build/modules/apple_support/1.24.1/MODULE.bazel": "f46e8ddad60aef170ee92b2f3d00ef66c147ceafea68b6877cb45bd91737f5f8", + "https://bcr.bazel.build/modules/apple_support/2.5.2/MODULE.bazel": "bb1b7081e390a8d3885f642cb0073dfcf8e7a36525e079fa8f5835af7079c0fe", + "https://bcr.bazel.build/modules/apple_support/2.5.2/source.json": "dd51ee925a550e92b55eb41c4c809a967da311a2d2520241252a238a48b39c4c", + "https://bcr.bazel.build/modules/bazel_features/1.1.1/MODULE.bazel": "27b8c79ef57efe08efccbd9dd6ef70d61b4798320b8d3c134fd571f78963dbcd", + "https://bcr.bazel.build/modules/bazel_features/1.10.0/MODULE.bazel": "f75e8807570484a99be90abcd52b5e1f390362c258bcb73106f4544957a48101", + "https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8", + "https://bcr.bazel.build/modules/bazel_features/1.15.0/MODULE.bazel": "d38ff6e517149dc509406aca0db3ad1efdd890a85e049585b7234d04238e2a4d", + "https://bcr.bazel.build/modules/bazel_features/1.17.0/MODULE.bazel": "039de32d21b816b47bd42c778e0454217e9c9caac4a3cf8e15c7231ee3ddee4d", + "https://bcr.bazel.build/modules/bazel_features/1.18.0/MODULE.bazel": "1be0ae2557ab3a72a57aeb31b29be347bcdc5d2b1eb1e70f39e3851a7e97041a", + "https://bcr.bazel.build/modules/bazel_features/1.19.0/MODULE.bazel": "59adcdf28230d220f0067b1f435b8537dd033bfff8db21335ef9217919c7fb58", + "https://bcr.bazel.build/modules/bazel_features/1.21.0/MODULE.bazel": "675642261665d8eea09989aa3b8afb5c37627f1be178382c320d1b46afba5e3b", + "https://bcr.bazel.build/modules/bazel_features/1.23.0/MODULE.bazel": "fd1ac84bc4e97a5a0816b7fd7d4d4f6d837b0047cf4cbd81652d616af3a6591a", + "https://bcr.bazel.build/modules/bazel_features/1.27.0/MODULE.bazel": "621eeee06c4458a9121d1f104efb80f39d34deff4984e778359c60eaf1a8cb65", + "https://bcr.bazel.build/modules/bazel_features/1.28.0/MODULE.bazel": "4b4200e6cbf8fa335b2c3f43e1d6ef3e240319c33d43d60cc0fbd4b87ece299d", + "https://bcr.bazel.build/modules/bazel_features/1.3.0/MODULE.bazel": "cdcafe83ec318cda34e02948e81d790aab8df7a929cec6f6969f13a489ccecd9", + "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87", + "https://bcr.bazel.build/modules/bazel_features/1.33.0/MODULE.bazel": "8b8dc9d2a4c88609409c3191165bccec0e4cb044cd7a72ccbe826583303459f6", + "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", + "https://bcr.bazel.build/modules/bazel_features/1.42.1/MODULE.bazel": "275a59b5406ff18c01739860aa70ad7ccb3cfb474579411decca11c93b951080", + "https://bcr.bazel.build/modules/bazel_features/1.50.0/MODULE.bazel": "2083ef9c7a469f520890483ccf8e0189d6e71e2117e7752e15e6554433d5ae3e", + "https://bcr.bazel.build/modules/bazel_features/1.50.0/source.json": "e0ee3debde2789ff56e4452e612d126925ba9ab64d4bde79c67f099d2902df9b", + "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", + "https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8", + "https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a", + "https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5", + "https://bcr.bazel.build/modules/bazel_skylib/1.4.1/MODULE.bazel": "a0dcb779424be33100dcae821e9e27e4f2901d9dfd5333efe5ac6a8d7ab75e1d", + "https://bcr.bazel.build/modules/bazel_skylib/1.4.2/MODULE.bazel": "3bd40978e7a1fac911d5989e6b09d8f64921865a45822d8b09e815eaa726a651", + "https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138", + "https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.0/MODULE.bazel": "0db596f4563de7938de764cc8deeabec291f55e8ec15299718b93c4423e9796d", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b", + "https://bcr.bazel.build/modules/bazel_skylib/1.8.1/MODULE.bazel": "88ade7293becda963e0e3ea33e7d54d3425127e0a326e0d17da085a5f1f03ff6", + "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67", + "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/source.json": "34a3c8bcf233b835eb74be9d628899bb32999d3e0eadef1947a0a562a2b16ffb", + "https://bcr.bazel.build/modules/buildozer/8.5.1/MODULE.bazel": "a35d9561b3fc5b18797c330793e99e3b834a473d5fbd3d7d7634aafc9bdb6f8f", + "https://bcr.bazel.build/modules/buildozer/8.5.1/source.json": "e3386e6ff4529f2442800dee47ad28d3e6487f36a1f75ae39ae56c70f0cd2fbd", + "https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb", + "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4", + "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6", + "https://bcr.bazel.build/modules/googletest/1.14.0/MODULE.bazel": "cfbcbf3e6eac06ef9d85900f64424708cc08687d1b527f0ef65aa7517af8118f", + "https://bcr.bazel.build/modules/googletest/1.15.2/MODULE.bazel": "6de1edc1d26cafb0ea1a6ab3f4d4192d91a312fd2d360b63adaa213cd00b2108", + "https://bcr.bazel.build/modules/googletest/1.17.0/MODULE.bazel": "dbec758171594a705933a29fcf69293d2468c49ec1f2ebca65c36f504d72df46", + "https://bcr.bazel.build/modules/googletest/1.17.0/source.json": "38e4454b25fc30f15439c0378e57909ab1fd0a443158aa35aec685da727cd713", + "https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075", + "https://bcr.bazel.build/modules/jsoncpp/1.9.6/MODULE.bazel": "2f8d20d3b7d54143213c4dfc3d98225c42de7d666011528dc8fe91591e2e17b0", + "https://bcr.bazel.build/modules/jsoncpp/1.9.6/source.json": "a04756d367a2126c3541682864ecec52f92cdee80a35735a3cb249ce015ca000", + "https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902", + "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/MODULE.bazel": "6f7b417dcc794d9add9e556673ad25cb3ba835224290f4f848f8e2db1e1fca74", + "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/source.json": "f448c6e8963fdfa7eb831457df83ad63d3d6355018f6574fb017e8169deb43a9", + "https://bcr.bazel.build/modules/package_metadata/0.0.3/MODULE.bazel": "77890552ecea9e284b5424c9de827a58099348763a4359e975c359a83d4faa83", + "https://bcr.bazel.build/modules/package_metadata/0.0.3/source.json": "742075a428ad12a3fa18a69014c2f57f01af910c6d9d18646c990200853e641a", + "https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5", + "https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f", + "https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee", + "https://bcr.bazel.build/modules/platforms/0.0.5/MODULE.bazel": "5733b54ea419d5eaf7997054bb55f6a1d0b5ff8aedf0176fef9eea44f3acda37", + "https://bcr.bazel.build/modules/platforms/0.0.6/MODULE.bazel": "ad6eeef431dc52aefd2d77ed20a4b353f8ebf0f4ecdd26a807d2da5aa8cd0615", + "https://bcr.bazel.build/modules/platforms/0.0.7/MODULE.bazel": "72fd4a0ede9ee5c021f6a8dd92b503e089f46c227ba2813ff183b71616034814", + "https://bcr.bazel.build/modules/platforms/0.0.8/MODULE.bazel": "9f142c03e348f6d263719f5074b21ef3adf0b139ee4c5133e2aa35664da9eb2d", + "https://bcr.bazel.build/modules/platforms/0.0.9/MODULE.bazel": "4a87a60c927b56ddd67db50c89acaa62f4ce2a1d2149ccb63ffd871d5ce29ebc", + "https://bcr.bazel.build/modules/platforms/1.0.0/MODULE.bazel": "f05feb42b48f1b3c225e4ccf351f367be0371411a803198ec34a389fb22aa580", + "https://bcr.bazel.build/modules/platforms/1.1.0/MODULE.bazel": "1c0c09f5bdcf4b3f924720d2478a3711cb39f4977019ca5988685e5b7e18b3d2", + "https://bcr.bazel.build/modules/platforms/1.1.0/source.json": "fcf351c47596c939140ab0d333dfdd08ed1ea6ce33c2fe70c12493a301cf1344", + "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7", + "https://bcr.bazel.build/modules/protobuf/27.0/MODULE.bazel": "7873b60be88844a0a1d8f80b9d5d20cfbd8495a689b8763e76c6372998d3f64c", + "https://bcr.bazel.build/modules/protobuf/29.0-rc2/MODULE.bazel": "6241d35983510143049943fc0d57937937122baf1b287862f9dc8590fc4c37df", + "https://bcr.bazel.build/modules/protobuf/29.0-rc3/MODULE.bazel": "33c2dfa286578573afc55a7acaea3cada4122b9631007c594bf0729f41c8de92", + "https://bcr.bazel.build/modules/protobuf/29.1/MODULE.bazel": "557c3457560ff49e122ed76c0bc3397a64af9574691cb8201b4e46d4ab2ecb95", + "https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0", + "https://bcr.bazel.build/modules/protobuf/32.1/MODULE.bazel": "89cd2866a9cb07fee9ff74c41ceace11554f32e0d849de4e23ac55515cfada4d", + "https://bcr.bazel.build/modules/protobuf/33.4/MODULE.bazel": "114775b816b38b6d0ca620450d6b02550c60ceedfdc8d9a229833b34a223dc42", + "https://bcr.bazel.build/modules/protobuf/33.4/source.json": "555f8686b4c7d6b5ba731fbea13bf656b4bfd9a7ff629c1d9d3f6e1d6155de79", + "https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/MODULE.bazel": "88af1c246226d87e65be78ed49ecd1e6f5e98648558c14ce99176da041dc378e", + "https://bcr.bazel.build/modules/pybind11_bazel/2.12.0/MODULE.bazel": "e6f4c20442eaa7c90d7190d8dc539d0ab422f95c65a57cc59562170c58ae3d34", + "https://bcr.bazel.build/modules/pybind11_bazel/2.12.0/source.json": "6900fdc8a9e95866b8c0d4ad4aba4d4236317b5c1cd04c502df3f0d33afed680", + "https://bcr.bazel.build/modules/re2/2023-09-01/MODULE.bazel": "cb3d511531b16cfc78a225a9e2136007a48cf8a677e4264baeab57fe78a80206", + "https://bcr.bazel.build/modules/re2/2024-07-02.bcr.1/MODULE.bazel": "b4963dda9b31080be1905ef085ecd7dd6cd47c05c79b9cdf83ade83ab2ab271a", + "https://bcr.bazel.build/modules/re2/2024-07-02.bcr.1/source.json": "2ff292be6ef3340325ce8a045ecc326e92cbfab47c7cbab4bd85d28971b97ac4", + "https://bcr.bazel.build/modules/re2/2024-07-02/MODULE.bazel": "0eadc4395959969297cbcf31a249ff457f2f1d456228c67719480205aa306daa", + "https://bcr.bazel.build/modules/rules_android/0.1.1/MODULE.bazel": "48809ab0091b07ad0182defb787c4c5328bd3a278938415c00a7b69b50c4d3a8", + "https://bcr.bazel.build/modules/rules_android/0.1.1/source.json": "e6986b41626ee10bdc864937ffb6d6bf275bb5b9c65120e6137d56e6331f089e", + "https://bcr.bazel.build/modules/rules_apple/3.16.0/MODULE.bazel": "0d1caf0b8375942ce98ea944be754a18874041e4e0459401d925577624d3a54a", + "https://bcr.bazel.build/modules/rules_apple/4.1.0/MODULE.bazel": "76e10fd4a48038d3fc7c5dc6e63b7063bbf5304a2e3bd42edda6ec660eebea68", + "https://bcr.bazel.build/modules/rules_apple/4.1.0/source.json": "8ee81e1708756f81b343a5eb2b2f0b953f1d25c4ab3d4a68dc02754872e80715", + "https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647", + "https://bcr.bazel.build/modules/rules_cc/0.0.10/MODULE.bazel": "ec1705118f7eaedd6e118508d3d26deba2a4e76476ada7e0e3965211be012002", + "https://bcr.bazel.build/modules/rules_cc/0.0.13/MODULE.bazel": "0e8529ed7b323dad0775ff924d2ae5af7640b23553dfcd4d34344c7e7a867191", + "https://bcr.bazel.build/modules/rules_cc/0.0.15/MODULE.bazel": "6704c35f7b4a72502ee81f61bf88706b54f06b3cbe5558ac17e2e14666cd5dcc", + "https://bcr.bazel.build/modules/rules_cc/0.0.16/MODULE.bazel": "7661303b8fc1b4d7f532e54e9d6565771fea666fbdf839e0a86affcd02defe87", + "https://bcr.bazel.build/modules/rules_cc/0.0.17/MODULE.bazel": "2ae1d8f4238ec67d7185d8861cb0a2cdf4bc608697c331b95bf990e69b62e64a", + "https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c", + "https://bcr.bazel.build/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f", + "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e", + "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5", + "https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513", + "https://bcr.bazel.build/modules/rules_cc/0.1.2/MODULE.bazel": "557ddc3a96858ec0d465a87c0a931054d7dcfd6583af2c7ed3baf494407fd8d0", + "https://bcr.bazel.build/modules/rules_cc/0.1.5/MODULE.bazel": "88dfc9361e8b5ae1008ac38f7cdfd45ad738e4fa676a3ad67d19204f045a1fd8", + "https://bcr.bazel.build/modules/rules_cc/0.2.0/MODULE.bazel": "b5c17f90458caae90d2ccd114c81970062946f49f355610ed89bebf954f5783c", + "https://bcr.bazel.build/modules/rules_cc/0.2.13/MODULE.bazel": "eecdd666eda6be16a8d9dc15e44b5c75133405e820f620a234acc4b1fdc5aa37", + "https://bcr.bazel.build/modules/rules_cc/0.2.15/MODULE.bazel": "6a0a4a75a57aa6dc888300d848053a58c6b12a29f89d4304e1c41448514ec6e8", + "https://bcr.bazel.build/modules/rules_cc/0.2.17/MODULE.bazel": "1849602c86cb60da8613d2de887f9566a6d354a6df6d7009f9d04a14402f9a84", + "https://bcr.bazel.build/modules/rules_cc/0.2.17/source.json": "3832f45d145354049137c0090df04629d9c2b5493dc5c2bf46f1834040133a07", + "https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc", + "https://bcr.bazel.build/modules/rules_cc/0.2.8/MODULE.bazel": "f1df20f0bf22c28192a794f29b501ee2018fa37a3862a1a2132ae2940a23a642", + "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6", + "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8", + "https://bcr.bazel.build/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74", + "https://bcr.bazel.build/modules/rules_java/5.3.5/MODULE.bazel": "a4ec4f2db570171e3e5eb753276ee4b389bae16b96207e9d3230895c99644b86", + "https://bcr.bazel.build/modules/rules_java/6.5.2/MODULE.bazel": "1d440d262d0e08453fa0c4d8f699ba81609ed0e9a9a0f02cd10b3e7942e61e31", + "https://bcr.bazel.build/modules/rules_java/7.10.0/MODULE.bazel": "530c3beb3067e870561739f1144329a21c851ff771cd752a49e06e3dc9c2e71a", + "https://bcr.bazel.build/modules/rules_java/7.12.2/MODULE.bazel": "579c505165ee757a4280ef83cda0150eea193eed3bef50b1004ba88b99da6de6", + "https://bcr.bazel.build/modules/rules_java/7.2.0/MODULE.bazel": "06c0334c9be61e6cef2c8c84a7800cef502063269a5af25ceb100b192453d4ab", + "https://bcr.bazel.build/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", + "https://bcr.bazel.build/modules/rules_java/8.3.2/MODULE.bazel": "7336d5511ad5af0b8615fdc7477535a2e4e723a357b6713af439fe8cf0195017", + "https://bcr.bazel.build/modules/rules_java/8.5.1/MODULE.bazel": "d8a9e38cc5228881f7055a6079f6f7821a073df3744d441978e7a43e20226939", + "https://bcr.bazel.build/modules/rules_java/8.6.1/MODULE.bazel": "f4808e2ab5b0197f094cabce9f4b006a27766beb6a9975931da07099560ca9c2", + "https://bcr.bazel.build/modules/rules_java/9.1.0/MODULE.bazel": "ee63f27e36a3fada80342869361182f120a9819c74320e8e65b1e04ba0cd7a9d", + "https://bcr.bazel.build/modules/rules_java/9.1.0/source.json": "da589573c1dee2c9ac4a568b301269a2e8191110ff0345c1a959fa7ea6c4dfd6", + "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", + "https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909", + "https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036", + "https://bcr.bazel.build/modules/rules_jvm_external/6.3/MODULE.bazel": "c998e060b85f71e00de5ec552019347c8bca255062c990ac02d051bb80a38df0", + "https://bcr.bazel.build/modules/rules_jvm_external/6.7/MODULE.bazel": "e717beabc4d091ecb2c803c2d341b88590e9116b8bf7947915eeb33aab4f96dd", + "https://bcr.bazel.build/modules/rules_jvm_external/6.7/source.json": "5426f412d0a7fc6b611643376c7e4a82dec991491b9ce5cb1cfdd25fe2e92be4", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/MODULE.bazel": "d269a01a18ee74d0335450b10f62c9ed81f2321d7958a2934e44272fe82dcef3", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/source.json": "2faa4794364282db7c06600b7e5e34867a564ae91bda7cae7c29c64e9466b7d5", + "https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0", + "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d", + "https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c", + "https://bcr.bazel.build/modules/rules_license/1.0.0/source.json": "a52c89e54cc311196e478f8382df91c15f7a2bfdf4c6cd0e2675cc2ff0b56efb", + "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc", + "https://bcr.bazel.build/modules/rules_pkg/1.0.1/MODULE.bazel": "5b1df97dbc29623bccdf2b0dcd0f5cb08e2f2c9050aab1092fd39a41e82686ff", + "https://bcr.bazel.build/modules/rules_pkg/1.0.1/source.json": "bd82e5d7b9ce2d31e380dd9f50c111d678c3bdaca190cb76b0e1c71b05e1ba8a", + "https://bcr.bazel.build/modules/rules_proto/4.0.0/MODULE.bazel": "a7a7b6ce9bee418c1a760b3d84f83a299ad6952f9903c67f19e4edd964894e06", + "https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7", + "https://bcr.bazel.build/modules/rules_proto/6.0.0-rc1/MODULE.bazel": "1e5b502e2e1a9e825eef74476a5a1ee524a92297085015a052510b09a1a09483", + "https://bcr.bazel.build/modules/rules_proto/6.0.2/MODULE.bazel": "ce916b775a62b90b61888052a416ccdda405212b6aaeb39522f7dc53431a5e73", + "https://bcr.bazel.build/modules/rules_proto/7.1.0/MODULE.bazel": "002d62d9108f75bb807cd56245d45648f38275cb3a99dcd45dfb864c5d74cb96", + "https://bcr.bazel.build/modules/rules_proto/7.1.0/source.json": "39f89066c12c24097854e8f57ab8558929f9c8d474d34b2c00ac04630ad8940e", + "https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f", + "https://bcr.bazel.build/modules/rules_python/0.23.1/MODULE.bazel": "49ffccf0511cb8414de28321f5fcf2a31312b47c40cc21577144b7447f2bf300", + "https://bcr.bazel.build/modules/rules_python/0.25.0/MODULE.bazel": "72f1506841c920a1afec76975b35312410eea3aa7b63267436bfb1dd91d2d382", + "https://bcr.bazel.build/modules/rules_python/0.28.0/MODULE.bazel": "cba2573d870babc976664a912539b320cbaa7114cd3e8f053c720171cde331ed", + "https://bcr.bazel.build/modules/rules_python/0.31.0/MODULE.bazel": "93a43dc47ee570e6ec9f5779b2e64c1476a6ce921c48cc9a1678a91dd5f8fd58", + "https://bcr.bazel.build/modules/rules_python/0.33.2/MODULE.bazel": "3e036c4ad8d804a4dad897d333d8dce200d943df4827cb849840055be8d2e937", + "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c", + "https://bcr.bazel.build/modules/rules_python/1.3.0/MODULE.bazel": "8361d57eafb67c09b75bf4bbe6be360e1b8f4f18118ab48037f2bd50aa2ccb13", + "https://bcr.bazel.build/modules/rules_python/1.4.1/MODULE.bazel": "8991ad45bdc25018301d6b7e1d3626afc3c8af8aaf4bc04f23d0b99c938b73a6", + "https://bcr.bazel.build/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8", + "https://bcr.bazel.build/modules/rules_python/1.7.0/MODULE.bazel": "d01f995ecd137abf30238ad9ce97f8fc3ac57289c8b24bd0bf53324d937a14f8", + "https://bcr.bazel.build/modules/rules_python/1.7.0/source.json": "028a084b65dcf8f4dc4f82f8778dbe65df133f234b316828a82e060d81bdce32", + "https://bcr.bazel.build/modules/rules_rust/0.71.3/MODULE.bazel": "e2390c96f77d65f00c769bf665678c5424188e9c777239cfaae2a8d2dde7b981", + "https://bcr.bazel.build/modules/rules_rust/0.71.3/source.json": "5eb5d8068571725bc893045f8137ed7937988f23d73c53ea443470e8047598ad", + "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c", + "https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b", + "https://bcr.bazel.build/modules/rules_shell/0.6.1/MODULE.bazel": "72e76b0eea4e81611ef5452aa82b3da34caca0c8b7b5c0c9584338aa93bae26b", + "https://bcr.bazel.build/modules/rules_shell/0.6.1/source.json": "20ec05cd5e592055e214b2da8ccb283c7f2a421ea0dc2acbf1aa792e11c03d0c", + "https://bcr.bazel.build/modules/rules_swift/1.16.0/MODULE.bazel": "4a09f199545a60d09895e8281362b1ff3bb08bbde69c6fc87aff5b92fcc916ca", + "https://bcr.bazel.build/modules/rules_swift/2.1.1/MODULE.bazel": "494900a80f944fc7aa61500c2073d9729dff0b764f0e89b824eb746959bc1046", + "https://bcr.bazel.build/modules/rules_swift/2.4.0/MODULE.bazel": "1639617eb1ede28d774d967a738b4a68b0accb40650beadb57c21846beab5efd", + "https://bcr.bazel.build/modules/rules_swift/3.1.2/MODULE.bazel": "72c8f5cf9d26427cee6c76c8e3853eb46ce6b0412a081b2b6db6e8ad56267400", + "https://bcr.bazel.build/modules/rules_swift/3.1.2/source.json": "e85761f3098a6faf40b8187695e3de6d97944e98abd0d8ce579cb2daf6319a66", + "https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8", + "https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c", + "https://bcr.bazel.build/modules/stardoc/0.7.0/MODULE.bazel": "05e3d6d30c099b6770e97da986c53bd31844d7f13d41412480ea265ac9e8079c", + "https://bcr.bazel.build/modules/stardoc/0.7.2/MODULE.bazel": "fc152419aa2ea0f51c29583fab1e8c99ddefd5b3778421845606ee628629e0e5", + "https://bcr.bazel.build/modules/stardoc/0.7.2/source.json": "58b029e5e901d6802967754adf0a9056747e8176f017cfe3607c0851f4d42216", + "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.1/MODULE.bazel": "5e463fbfba7b1701d957555ed45097d7f984211330106ccd1352c6e0af0dcf91", + "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.2/MODULE.bazel": "75aab2373a4bbe2a1260b9bf2a1ebbdbf872d3bd36f80bff058dccd82e89422f", + "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.2/source.json": "5fba48bbe0ba48761f9e9f75f92876cafb5d07c0ce059cc7a8027416de94a05b", + "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", + "https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/MODULE.bazel": "eec517b5bbe5492629466e11dae908d043364302283de25581e3eb944326c4ca", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/source.json": "22bc55c47af97246cfc093d0acf683a7869377de362b5d1c552c2c2e16b7a806", + "https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198" + }, + "selectedYankedVersions": {}, + "moduleExtensions": { + "@@rules_kotlin+//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": { + "general": { + "bzlTransitiveDigest": "WDuVCwqV73DvcHB5Of+02lhUZgPxr9MqtpvMRyUi0eQ=", + "usagesDigest": "QI2z8ZUR+mqtbwsf2fLqYdJAkPOHdOV+tF2yVAUgRzw=", + "recordedInputs": [ + "REPO_MAPPING:rules_kotlin+,bazel_tools bazel_tools" + ], + "generatedRepoSpecs": { + "com_github_jetbrains_kotlin_git": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_compiler_git_repository", + "attributes": { + "urls": [ + "https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip" + ], + "sha256": "93137d3aab9afa9b27cb06a824c2324195c6b6f6179d8a8653f440f5bd58be88" + } + }, + "com_github_jetbrains_kotlin": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_capabilities_repository", + "attributes": { + "git_repository_name": "com_github_jetbrains_kotlin_git", + "compiler_version": "1.9.23" + } + }, + "com_github_google_ksp": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:ksp.bzl%ksp_compiler_plugin_repository", + "attributes": { + "urls": [ + "https://github.com/google/ksp/releases/download/1.9.23-1.0.20/artifacts.zip" + ], + "sha256": "ee0618755913ef7fd6511288a232e8fad24838b9af6ea73972a76e81053c8c2d", + "strip_version": "1.9.23-1.0.20" + } + }, + "com_github_pinterest_ktlint": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_file", + "attributes": { + "sha256": "01b2e0ef893383a50dbeb13970fe7fa3be36ca3e83259e01649945b09d736985", + "urls": [ + "https://github.com/pinterest/ktlint/releases/download/1.3.0/ktlint" + ], + "executable": true + } + }, + "rules_android": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "sha256": "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", + "strip_prefix": "rules_android-0.1.1", + "urls": [ + "https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip" + ] + } + } + } + } + }, + "@@rules_python+//python/extensions:config.bzl%config": { + "general": { + "bzlTransitiveDigest": "L+2ZCpb7GIJqvWaXpzkfk/80d916sIFVmSPzrSm6of8=", + "usagesDigest": "ZVSXMAGpD+xzVNPuvF1IoLBkty7TROO0+akMapt1pAg=", + "recordedInputs": [ + "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_python+,pypi__build rules_python++config+pypi__build", + "REPO_MAPPING:rules_python+,pypi__click rules_python++config+pypi__click", + "REPO_MAPPING:rules_python+,pypi__colorama rules_python++config+pypi__colorama", + "REPO_MAPPING:rules_python+,pypi__importlib_metadata rules_python++config+pypi__importlib_metadata", + "REPO_MAPPING:rules_python+,pypi__installer rules_python++config+pypi__installer", + "REPO_MAPPING:rules_python+,pypi__more_itertools rules_python++config+pypi__more_itertools", + "REPO_MAPPING:rules_python+,pypi__packaging rules_python++config+pypi__packaging", + "REPO_MAPPING:rules_python+,pypi__pep517 rules_python++config+pypi__pep517", + "REPO_MAPPING:rules_python+,pypi__pip rules_python++config+pypi__pip", + "REPO_MAPPING:rules_python+,pypi__pip_tools rules_python++config+pypi__pip_tools", + "REPO_MAPPING:rules_python+,pypi__pyproject_hooks rules_python++config+pypi__pyproject_hooks", + "REPO_MAPPING:rules_python+,pypi__setuptools rules_python++config+pypi__setuptools", + "REPO_MAPPING:rules_python+,pypi__tomli rules_python++config+pypi__tomli", + "REPO_MAPPING:rules_python+,pypi__wheel rules_python++config+pypi__wheel", + "REPO_MAPPING:rules_python+,pypi__zipp rules_python++config+pypi__zipp" + ], + "generatedRepoSpecs": { + "rules_python_internal": { + "repoRuleId": "@@rules_python+//python/private:internal_config_repo.bzl%internal_config_repo", + "attributes": { + "transition_setting_generators": {}, + "transition_settings": [] + } + }, + "pypi__build": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/e2/03/f3c8ba0a6b6e30d7d18c40faab90807c9bb5e9a1e3b2fe2008af624a9c97/build-1.2.1-py3-none-any.whl", + "sha256": "75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__click": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__colorama": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", + "sha256": "4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__importlib_metadata": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/2d/0a/679461c511447ffaf176567d5c496d1de27cbe34a87df6677d7171b2fbd4/importlib_metadata-7.1.0-py3-none-any.whl", + "sha256": "30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__installer": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/e5/ca/1172b6638d52f2d6caa2dd262ec4c811ba59eee96d54a7701930726bce18/installer-0.7.0-py3-none-any.whl", + "sha256": "05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__more_itertools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/50/e2/8e10e465ee3987bb7c9ab69efb91d867d93959095f4807db102d07995d94/more_itertools-10.2.0-py3-none-any.whl", + "sha256": "686b06abe565edfab151cb8fd385a05651e1fdf8f0a14191e4439283421f8684", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__packaging": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl", + "sha256": "2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pep517": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/25/6e/ca4a5434eb0e502210f591b97537d322546e4833dcb4d470a48c375c5540/pep517-0.13.1-py3-none-any.whl", + "sha256": "31b206f67165b3536dd577c5c3f1518e8fbaf38cbc57efff8369a392feff1721", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pip": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl", + "sha256": "ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pip_tools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/0d/dc/38f4ce065e92c66f058ea7a368a9c5de4e702272b479c0992059f7693941/pip_tools-7.4.1-py3-none-any.whl", + "sha256": "4c690e5fbae2f21e87843e89c26191f0d9454f362d8acdbd695716493ec8b3a9", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pyproject_hooks": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/ae/f3/431b9d5fe7d14af7a32340792ef43b8a714e7726f1d7b69cc4e8e7a3f1d7/pyproject_hooks-1.1.0-py3-none-any.whl", + "sha256": "7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__setuptools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/90/99/158ad0609729111163fc1f674a5a42f2605371a4cf036d0441070e2f7455/setuptools-78.1.1-py3-none-any.whl", + "sha256": "c3a9c4211ff4c309edb8b8c4f1cbfa7ae324c4ba9f91ff254e3d305b9fd54561", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__tomli": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl", + "sha256": "939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__wheel": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/7d/cd/d7460c9a869b16c3dd4e1e403cce337df165368c71d6af229a74699622ce/wheel-0.43.0-py3-none-any.whl", + "sha256": "55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__zipp": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/da/55/a03fd7240714916507e1fcf7ae355bd9d9ed2e6db492595f1a67f61681be/zipp-3.18.2-py3-none-any.whl", + "sha256": "dce197b859eb796242b0622af1b8beb0a722d52aa2f57133ead08edd5bf5374e", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + } + } + } + }, + "@@rules_python+//python/uv:uv.bzl%uv": { + "general": { + "bzlTransitiveDigest": "IgkgxNrtlAec7OnaFrWoCC5NQhHcY/aIz4jsqcNMm8Y=", + "usagesDigest": "H8dQoNZcoqP+Mu0tHZTi4KHATzvNkM5ePuEqoQdklIU=", + "recordedInputs": [ + "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_python+,platforms platforms" + ], + "generatedRepoSpecs": { + "uv": { + "repoRuleId": "@@rules_python+//python/uv/private:uv_toolchains_repo.bzl%uv_toolchains_repo", + "attributes": { + "toolchain_type": "'@@rules_python+//python/uv:uv_toolchain_type'", + "toolchain_names": [ + "none" + ], + "toolchain_implementations": { + "none": "'@@rules_python+//python:none'" + }, + "toolchain_compatible_with": { + "none": [ + "@platforms//:incompatible" + ] + }, + "toolchain_target_settings": {} + } + } + } + } + } + }, + "facts": {}, + "factsVersions": {} +} diff --git a/examples/rust/data/dummy.txt b/examples/rust/data/dummy.txt new file mode 100644 index 0000000..eaf5f75 --- /dev/null +++ b/examples/rust/data/dummy.txt @@ -0,0 +1 @@ +dummy content diff --git a/examples/rust/data/info.txt b/examples/rust/data/info.txt new file mode 100644 index 0000000..9be0bfa --- /dev/null +++ b/examples/rust/data/info.txt @@ -0,0 +1 @@ +info content diff --git a/examples/rust/helper.rs b/examples/rust/helper.rs new file mode 100644 index 0000000..405d939 --- /dev/null +++ b/examples/rust/helper.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello from helper!"); +} diff --git a/examples/rust/main.rs b/examples/rust/main.rs new file mode 100644 index 0000000..99a598e --- /dev/null +++ b/examples/rust/main.rs @@ -0,0 +1,28 @@ +use std::process::ExitCode; + +fn main() -> ExitCode { + // 1. Resolve a runfile, handling the error. + let data_file = match resources::DATA_FILE.resolve() { + Ok(file) => file, + Err(err) => { + eprintln!("Error resolving runfile: {err}"); + return ExitCode::FAILURE; + } + }; + let content = std::fs::read_to_string(data_file.path()).expect("read data file"); + println!("Data: {content}"); + + // 2. Run an executable runfile with the runfiles environment (fail-fast). + let helper = resources::HELPER_TOOL.must_resolve(); + let output = helper.command().output().expect("run helper"); + print!("Helper output: {}", String::from_utf8_lossy(&output.stdout)); + + // 3. Access a set of runfiles by relative path. + let example_set = resources::EXAMPLE_SET.must_resolve(); + let paths: Vec<_> = example_set.rel_paths().collect(); + println!("FileSet paths: {paths:?}"); + let dummy = example_set.must_file("dummy.txt"); + let dummy_content = std::fs::read_to_string(dummy.path()).expect("read dummy.txt"); + println!("FileSet dummy content: {}", dummy_content.trim()); + ExitCode::SUCCESS +} diff --git a/examples/rust/run_test.sh b/examples/rust/run_test.sh new file mode 100755 index 0000000..c1782d8 --- /dev/null +++ b/examples/rust/run_test.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# Run the Rust binary and verify it prints the expected output. + +BINARY="./main" + +if [ ! -f "$BINARY" ]; then + echo "Error: Binary not found at $BINARY" + exit 1 +fi + +OUTPUT=$($BINARY) +EXIT_CODE=$? + +if [ $EXIT_CODE -ne 0 ]; then + echo "Error: Binary exited with code $EXIT_CODE" + exit 1 +fi + +EXPECTED='Data: dummy content + +Helper output: Hello from helper! +FileSet paths: ["dummy.txt", "info.txt"] +FileSet dummy content: dummy content' +if [ "$OUTPUT" != "$EXPECTED" ]; then + echo "Error: Unexpected output" + echo "Expected: $EXPECTED" + echo "Got: $OUTPUT" + exit 1 +fi + +echo "Quickstart Rust example passed!" diff --git a/rust/.bazelrc b/rust/.bazelrc new file mode 100644 index 0000000..aec77e8 --- /dev/null +++ b/rust/.bazelrc @@ -0,0 +1,3 @@ +# Use precompiled protoc to speed up builds and avoid compiling from source. +common --incompatible_enable_proto_toolchain_resolution=true +common --@protobuf//bazel/toolchains:prefer_prebuilt_protoc diff --git a/rust/BUILD.bazel b/rust/BUILD.bazel new file mode 100644 index 0000000..193795b --- /dev/null +++ b/rust/BUILD.bazel @@ -0,0 +1,17 @@ +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") + +package(default_visibility = ["//visibility:public"]) + +exports_files([ + "defs.bzl", + "MODULE.bazel", +]) + +bzl_library( + name = "defs_bzl", + srcs = ["defs.bzl"], + deps = [ + "@rules_runfile_codegen_core//internal:internal_bzl", + "@rules_rust//rust:bzl_lib", + ], +) diff --git a/rust/MODULE.bazel b/rust/MODULE.bazel new file mode 100644 index 0000000..c6a9260 --- /dev/null +++ b/rust/MODULE.bazel @@ -0,0 +1,28 @@ +module( + name = "rules_runfile_codegen_rust", + version = "0.1.2", +) + +bazel_dep(name = "rules_rust", version = "0.71.3") +bazel_dep(name = "rules_runfile_codegen_core", version = "0.1.2") +bazel_dep(name = "bazel_skylib", version = "1.8.2") + +bazel_dep(name = "stardoc", version = "0.8.1", dev_dependency = True) +bazel_dep(name = "protobuf", version = "33.4", dev_dependency = True) + +local_path_override( + module_name = "rules_runfile_codegen_core", + path = "../core", +) + +rust = use_extension("@rules_rust//rust:extensions.bzl", "rust", dev_dependency = True) +rust.toolchain( + edition = "2021", + versions = ["1.88.0"], +) +use_repo(rust, "rust_toolchains") + +register_toolchains( + "@rust_toolchains//:all", + dev_dependency = True, +) diff --git a/rust/MODULE.bazel.lock b/rust/MODULE.bazel.lock new file mode 100644 index 0000000..7fd88f9 --- /dev/null +++ b/rust/MODULE.bazel.lock @@ -0,0 +1,461 @@ +{ + "lockFileVersion": 28, + "registryFileHashes": { + "https://bcr.bazel.build/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497", + "https://bcr.bazel.build/modules/abseil-cpp/20210324.2/MODULE.bazel": "7cd0312e064fde87c8d1cd79ba06c876bd23630c83466e9500321be55c96ace2", + "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/MODULE.bazel": "70390338f7a5106231d20620712f7cccb659cd0e9d073d1991c038eb9fc57589", + "https://bcr.bazel.build/modules/abseil-cpp/20230125.1/MODULE.bazel": "89047429cb0207707b2dface14ba7f8df85273d484c2572755be4bab7ce9c3a0", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.0.bcr.1/MODULE.bazel": "1c8cec495288dccd14fdae6e3f95f772c1c91857047a098fad772034264cc8cb", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.0/MODULE.bazel": "d253ae36a8bd9ee3c5955384096ccb6baf16a1b1e93e858370da0a3b94f77c16", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.1/MODULE.bazel": "fa92e2eb41a04df73cdabeec37107316f7e5272650f81d6cc096418fe647b915", + "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/MODULE.bazel": "37bcdb4440fbb61df6a1c296ae01b327f19e9bb521f9b8e26ec854b6f97309ed", + "https://bcr.bazel.build/modules/abseil-cpp/20240116.2/MODULE.bazel": "73939767a4686cd9a520d16af5ab440071ed75cec1a876bf2fcfaf1f71987a16", + "https://bcr.bazel.build/modules/abseil-cpp/20250127.1/MODULE.bazel": "c4a89e7ceb9bf1e25cf84a9f830ff6b817b72874088bf5141b314726e46a57c1", + "https://bcr.bazel.build/modules/abseil-cpp/20250512.1/MODULE.bazel": "d209fdb6f36ffaf61c509fcc81b19e81b411a999a934a032e10cd009a0226215", + "https://bcr.bazel.build/modules/abseil-cpp/20250814.1/MODULE.bazel": "51f2312901470cdab0dbdf3b88c40cd21c62a7ed58a3de45b365ddc5b11bcab2", + "https://bcr.bazel.build/modules/abseil-cpp/20250814.1/source.json": "cea3901d7e299da7320700abbaafe57a65d039f10d0d7ea601c4a66938ea4b0c", + "https://bcr.bazel.build/modules/apple_support/1.11.1/MODULE.bazel": "1843d7cd8a58369a444fc6000e7304425fba600ff641592161d9f15b179fb896", + "https://bcr.bazel.build/modules/apple_support/1.15.1/MODULE.bazel": "a0556fefca0b1bb2de8567b8827518f94db6a6e7e7d632b4c48dc5f865bc7c85", + "https://bcr.bazel.build/modules/apple_support/1.21.0/MODULE.bazel": "ac1824ed5edf17dee2fdd4927ada30c9f8c3b520be1b5fd02a5da15bc10bff3e", + "https://bcr.bazel.build/modules/apple_support/1.21.1/MODULE.bazel": "5809fa3efab15d1f3c3c635af6974044bac8a4919c62238cce06acee8a8c11f1", + "https://bcr.bazel.build/modules/apple_support/1.24.1/MODULE.bazel": "f46e8ddad60aef170ee92b2f3d00ef66c147ceafea68b6877cb45bd91737f5f8", + "https://bcr.bazel.build/modules/apple_support/2.5.2/MODULE.bazel": "bb1b7081e390a8d3885f642cb0073dfcf8e7a36525e079fa8f5835af7079c0fe", + "https://bcr.bazel.build/modules/apple_support/2.5.2/source.json": "dd51ee925a550e92b55eb41c4c809a967da311a2d2520241252a238a48b39c4c", + "https://bcr.bazel.build/modules/bazel_features/1.1.1/MODULE.bazel": "27b8c79ef57efe08efccbd9dd6ef70d61b4798320b8d3c134fd571f78963dbcd", + "https://bcr.bazel.build/modules/bazel_features/1.10.0/MODULE.bazel": "f75e8807570484a99be90abcd52b5e1f390362c258bcb73106f4544957a48101", + "https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8", + "https://bcr.bazel.build/modules/bazel_features/1.15.0/MODULE.bazel": "d38ff6e517149dc509406aca0db3ad1efdd890a85e049585b7234d04238e2a4d", + "https://bcr.bazel.build/modules/bazel_features/1.17.0/MODULE.bazel": "039de32d21b816b47bd42c778e0454217e9c9caac4a3cf8e15c7231ee3ddee4d", + "https://bcr.bazel.build/modules/bazel_features/1.18.0/MODULE.bazel": "1be0ae2557ab3a72a57aeb31b29be347bcdc5d2b1eb1e70f39e3851a7e97041a", + "https://bcr.bazel.build/modules/bazel_features/1.19.0/MODULE.bazel": "59adcdf28230d220f0067b1f435b8537dd033bfff8db21335ef9217919c7fb58", + "https://bcr.bazel.build/modules/bazel_features/1.21.0/MODULE.bazel": "675642261665d8eea09989aa3b8afb5c37627f1be178382c320d1b46afba5e3b", + "https://bcr.bazel.build/modules/bazel_features/1.23.0/MODULE.bazel": "fd1ac84bc4e97a5a0816b7fd7d4d4f6d837b0047cf4cbd81652d616af3a6591a", + "https://bcr.bazel.build/modules/bazel_features/1.27.0/MODULE.bazel": "621eeee06c4458a9121d1f104efb80f39d34deff4984e778359c60eaf1a8cb65", + "https://bcr.bazel.build/modules/bazel_features/1.28.0/MODULE.bazel": "4b4200e6cbf8fa335b2c3f43e1d6ef3e240319c33d43d60cc0fbd4b87ece299d", + "https://bcr.bazel.build/modules/bazel_features/1.3.0/MODULE.bazel": "cdcafe83ec318cda34e02948e81d790aab8df7a929cec6f6969f13a489ccecd9", + "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87", + "https://bcr.bazel.build/modules/bazel_features/1.33.0/MODULE.bazel": "8b8dc9d2a4c88609409c3191165bccec0e4cb044cd7a72ccbe826583303459f6", + "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", + "https://bcr.bazel.build/modules/bazel_features/1.42.1/MODULE.bazel": "275a59b5406ff18c01739860aa70ad7ccb3cfb474579411decca11c93b951080", + "https://bcr.bazel.build/modules/bazel_features/1.50.0/MODULE.bazel": "2083ef9c7a469f520890483ccf8e0189d6e71e2117e7752e15e6554433d5ae3e", + "https://bcr.bazel.build/modules/bazel_features/1.50.0/source.json": "e0ee3debde2789ff56e4452e612d126925ba9ab64d4bde79c67f099d2902df9b", + "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", + "https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8", + "https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a", + "https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5", + "https://bcr.bazel.build/modules/bazel_skylib/1.4.1/MODULE.bazel": "a0dcb779424be33100dcae821e9e27e4f2901d9dfd5333efe5ac6a8d7ab75e1d", + "https://bcr.bazel.build/modules/bazel_skylib/1.4.2/MODULE.bazel": "3bd40978e7a1fac911d5989e6b09d8f64921865a45822d8b09e815eaa726a651", + "https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138", + "https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.0/MODULE.bazel": "0db596f4563de7938de764cc8deeabec291f55e8ec15299718b93c4423e9796d", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b", + "https://bcr.bazel.build/modules/bazel_skylib/1.8.1/MODULE.bazel": "88ade7293becda963e0e3ea33e7d54d3425127e0a326e0d17da085a5f1f03ff6", + "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67", + "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/source.json": "34a3c8bcf233b835eb74be9d628899bb32999d3e0eadef1947a0a562a2b16ffb", + "https://bcr.bazel.build/modules/buildozer/8.5.1/MODULE.bazel": "a35d9561b3fc5b18797c330793e99e3b834a473d5fbd3d7d7634aafc9bdb6f8f", + "https://bcr.bazel.build/modules/buildozer/8.5.1/source.json": "e3386e6ff4529f2442800dee47ad28d3e6487f36a1f75ae39ae56c70f0cd2fbd", + "https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb", + "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4", + "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6", + "https://bcr.bazel.build/modules/googletest/1.14.0/MODULE.bazel": "cfbcbf3e6eac06ef9d85900f64424708cc08687d1b527f0ef65aa7517af8118f", + "https://bcr.bazel.build/modules/googletest/1.15.2/MODULE.bazel": "6de1edc1d26cafb0ea1a6ab3f4d4192d91a312fd2d360b63adaa213cd00b2108", + "https://bcr.bazel.build/modules/googletest/1.17.0/MODULE.bazel": "dbec758171594a705933a29fcf69293d2468c49ec1f2ebca65c36f504d72df46", + "https://bcr.bazel.build/modules/googletest/1.17.0/source.json": "38e4454b25fc30f15439c0378e57909ab1fd0a443158aa35aec685da727cd713", + "https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075", + "https://bcr.bazel.build/modules/jsoncpp/1.9.6/MODULE.bazel": "2f8d20d3b7d54143213c4dfc3d98225c42de7d666011528dc8fe91591e2e17b0", + "https://bcr.bazel.build/modules/jsoncpp/1.9.6/source.json": "a04756d367a2126c3541682864ecec52f92cdee80a35735a3cb249ce015ca000", + "https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902", + "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/MODULE.bazel": "6f7b417dcc794d9add9e556673ad25cb3ba835224290f4f848f8e2db1e1fca74", + "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/source.json": "f448c6e8963fdfa7eb831457df83ad63d3d6355018f6574fb017e8169deb43a9", + "https://bcr.bazel.build/modules/package_metadata/0.0.3/MODULE.bazel": "77890552ecea9e284b5424c9de827a58099348763a4359e975c359a83d4faa83", + "https://bcr.bazel.build/modules/package_metadata/0.0.3/source.json": "742075a428ad12a3fa18a69014c2f57f01af910c6d9d18646c990200853e641a", + "https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5", + "https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f", + "https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee", + "https://bcr.bazel.build/modules/platforms/0.0.5/MODULE.bazel": "5733b54ea419d5eaf7997054bb55f6a1d0b5ff8aedf0176fef9eea44f3acda37", + "https://bcr.bazel.build/modules/platforms/0.0.6/MODULE.bazel": "ad6eeef431dc52aefd2d77ed20a4b353f8ebf0f4ecdd26a807d2da5aa8cd0615", + "https://bcr.bazel.build/modules/platforms/0.0.7/MODULE.bazel": "72fd4a0ede9ee5c021f6a8dd92b503e089f46c227ba2813ff183b71616034814", + "https://bcr.bazel.build/modules/platforms/0.0.8/MODULE.bazel": "9f142c03e348f6d263719f5074b21ef3adf0b139ee4c5133e2aa35664da9eb2d", + "https://bcr.bazel.build/modules/platforms/0.0.9/MODULE.bazel": "4a87a60c927b56ddd67db50c89acaa62f4ce2a1d2149ccb63ffd871d5ce29ebc", + "https://bcr.bazel.build/modules/platforms/1.0.0/MODULE.bazel": "f05feb42b48f1b3c225e4ccf351f367be0371411a803198ec34a389fb22aa580", + "https://bcr.bazel.build/modules/platforms/1.1.0/MODULE.bazel": "1c0c09f5bdcf4b3f924720d2478a3711cb39f4977019ca5988685e5b7e18b3d2", + "https://bcr.bazel.build/modules/platforms/1.1.0/source.json": "fcf351c47596c939140ab0d333dfdd08ed1ea6ce33c2fe70c12493a301cf1344", + "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7", + "https://bcr.bazel.build/modules/protobuf/27.0/MODULE.bazel": "7873b60be88844a0a1d8f80b9d5d20cfbd8495a689b8763e76c6372998d3f64c", + "https://bcr.bazel.build/modules/protobuf/29.0-rc2/MODULE.bazel": "6241d35983510143049943fc0d57937937122baf1b287862f9dc8590fc4c37df", + "https://bcr.bazel.build/modules/protobuf/29.0-rc3/MODULE.bazel": "33c2dfa286578573afc55a7acaea3cada4122b9631007c594bf0729f41c8de92", + "https://bcr.bazel.build/modules/protobuf/29.0/MODULE.bazel": "319dc8bf4c679ff87e71b1ccfb5a6e90a6dbc4693501d471f48662ac46d04e4e", + "https://bcr.bazel.build/modules/protobuf/29.1/MODULE.bazel": "557c3457560ff49e122ed76c0bc3397a64af9574691cb8201b4e46d4ab2ecb95", + "https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0", + "https://bcr.bazel.build/modules/protobuf/32.1/MODULE.bazel": "89cd2866a9cb07fee9ff74c41ceace11554f32e0d849de4e23ac55515cfada4d", + "https://bcr.bazel.build/modules/protobuf/33.4/MODULE.bazel": "114775b816b38b6d0ca620450d6b02550c60ceedfdc8d9a229833b34a223dc42", + "https://bcr.bazel.build/modules/protobuf/33.4/source.json": "555f8686b4c7d6b5ba731fbea13bf656b4bfd9a7ff629c1d9d3f6e1d6155de79", + "https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/MODULE.bazel": "88af1c246226d87e65be78ed49ecd1e6f5e98648558c14ce99176da041dc378e", + "https://bcr.bazel.build/modules/pybind11_bazel/2.12.0/MODULE.bazel": "e6f4c20442eaa7c90d7190d8dc539d0ab422f95c65a57cc59562170c58ae3d34", + "https://bcr.bazel.build/modules/pybind11_bazel/2.12.0/source.json": "6900fdc8a9e95866b8c0d4ad4aba4d4236317b5c1cd04c502df3f0d33afed680", + "https://bcr.bazel.build/modules/re2/2023-09-01/MODULE.bazel": "cb3d511531b16cfc78a225a9e2136007a48cf8a677e4264baeab57fe78a80206", + "https://bcr.bazel.build/modules/re2/2024-07-02.bcr.1/MODULE.bazel": "b4963dda9b31080be1905ef085ecd7dd6cd47c05c79b9cdf83ade83ab2ab271a", + "https://bcr.bazel.build/modules/re2/2024-07-02.bcr.1/source.json": "2ff292be6ef3340325ce8a045ecc326e92cbfab47c7cbab4bd85d28971b97ac4", + "https://bcr.bazel.build/modules/re2/2024-07-02/MODULE.bazel": "0eadc4395959969297cbcf31a249ff457f2f1d456228c67719480205aa306daa", + "https://bcr.bazel.build/modules/rules_android/0.1.1/MODULE.bazel": "48809ab0091b07ad0182defb787c4c5328bd3a278938415c00a7b69b50c4d3a8", + "https://bcr.bazel.build/modules/rules_android/0.1.1/source.json": "e6986b41626ee10bdc864937ffb6d6bf275bb5b9c65120e6137d56e6331f089e", + "https://bcr.bazel.build/modules/rules_apple/3.16.0/MODULE.bazel": "0d1caf0b8375942ce98ea944be754a18874041e4e0459401d925577624d3a54a", + "https://bcr.bazel.build/modules/rules_apple/4.1.0/MODULE.bazel": "76e10fd4a48038d3fc7c5dc6e63b7063bbf5304a2e3bd42edda6ec660eebea68", + "https://bcr.bazel.build/modules/rules_apple/4.1.0/source.json": "8ee81e1708756f81b343a5eb2b2f0b953f1d25c4ab3d4a68dc02754872e80715", + "https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647", + "https://bcr.bazel.build/modules/rules_cc/0.0.10/MODULE.bazel": "ec1705118f7eaedd6e118508d3d26deba2a4e76476ada7e0e3965211be012002", + "https://bcr.bazel.build/modules/rules_cc/0.0.13/MODULE.bazel": "0e8529ed7b323dad0775ff924d2ae5af7640b23553dfcd4d34344c7e7a867191", + "https://bcr.bazel.build/modules/rules_cc/0.0.15/MODULE.bazel": "6704c35f7b4a72502ee81f61bf88706b54f06b3cbe5558ac17e2e14666cd5dcc", + "https://bcr.bazel.build/modules/rules_cc/0.0.16/MODULE.bazel": "7661303b8fc1b4d7f532e54e9d6565771fea666fbdf839e0a86affcd02defe87", + "https://bcr.bazel.build/modules/rules_cc/0.0.17/MODULE.bazel": "2ae1d8f4238ec67d7185d8861cb0a2cdf4bc608697c331b95bf990e69b62e64a", + "https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c", + "https://bcr.bazel.build/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f", + "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e", + "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5", + "https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513", + "https://bcr.bazel.build/modules/rules_cc/0.1.2/MODULE.bazel": "557ddc3a96858ec0d465a87c0a931054d7dcfd6583af2c7ed3baf494407fd8d0", + "https://bcr.bazel.build/modules/rules_cc/0.1.5/MODULE.bazel": "88dfc9361e8b5ae1008ac38f7cdfd45ad738e4fa676a3ad67d19204f045a1fd8", + "https://bcr.bazel.build/modules/rules_cc/0.2.0/MODULE.bazel": "b5c17f90458caae90d2ccd114c81970062946f49f355610ed89bebf954f5783c", + "https://bcr.bazel.build/modules/rules_cc/0.2.13/MODULE.bazel": "eecdd666eda6be16a8d9dc15e44b5c75133405e820f620a234acc4b1fdc5aa37", + "https://bcr.bazel.build/modules/rules_cc/0.2.15/MODULE.bazel": "6a0a4a75a57aa6dc888300d848053a58c6b12a29f89d4304e1c41448514ec6e8", + "https://bcr.bazel.build/modules/rules_cc/0.2.17/MODULE.bazel": "1849602c86cb60da8613d2de887f9566a6d354a6df6d7009f9d04a14402f9a84", + "https://bcr.bazel.build/modules/rules_cc/0.2.17/source.json": "3832f45d145354049137c0090df04629d9c2b5493dc5c2bf46f1834040133a07", + "https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc", + "https://bcr.bazel.build/modules/rules_cc/0.2.8/MODULE.bazel": "f1df20f0bf22c28192a794f29b501ee2018fa37a3862a1a2132ae2940a23a642", + "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6", + "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8", + "https://bcr.bazel.build/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74", + "https://bcr.bazel.build/modules/rules_java/5.3.5/MODULE.bazel": "a4ec4f2db570171e3e5eb753276ee4b389bae16b96207e9d3230895c99644b86", + "https://bcr.bazel.build/modules/rules_java/6.5.2/MODULE.bazel": "1d440d262d0e08453fa0c4d8f699ba81609ed0e9a9a0f02cd10b3e7942e61e31", + "https://bcr.bazel.build/modules/rules_java/7.10.0/MODULE.bazel": "530c3beb3067e870561739f1144329a21c851ff771cd752a49e06e3dc9c2e71a", + "https://bcr.bazel.build/modules/rules_java/7.12.2/MODULE.bazel": "579c505165ee757a4280ef83cda0150eea193eed3bef50b1004ba88b99da6de6", + "https://bcr.bazel.build/modules/rules_java/7.2.0/MODULE.bazel": "06c0334c9be61e6cef2c8c84a7800cef502063269a5af25ceb100b192453d4ab", + "https://bcr.bazel.build/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", + "https://bcr.bazel.build/modules/rules_java/8.3.2/MODULE.bazel": "7336d5511ad5af0b8615fdc7477535a2e4e723a357b6713af439fe8cf0195017", + "https://bcr.bazel.build/modules/rules_java/8.5.1/MODULE.bazel": "d8a9e38cc5228881f7055a6079f6f7821a073df3744d441978e7a43e20226939", + "https://bcr.bazel.build/modules/rules_java/8.6.1/MODULE.bazel": "f4808e2ab5b0197f094cabce9f4b006a27766beb6a9975931da07099560ca9c2", + "https://bcr.bazel.build/modules/rules_java/9.1.0/MODULE.bazel": "ee63f27e36a3fada80342869361182f120a9819c74320e8e65b1e04ba0cd7a9d", + "https://bcr.bazel.build/modules/rules_java/9.1.0/source.json": "da589573c1dee2c9ac4a568b301269a2e8191110ff0345c1a959fa7ea6c4dfd6", + "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", + "https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909", + "https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036", + "https://bcr.bazel.build/modules/rules_jvm_external/6.3/MODULE.bazel": "c998e060b85f71e00de5ec552019347c8bca255062c990ac02d051bb80a38df0", + "https://bcr.bazel.build/modules/rules_jvm_external/6.6/MODULE.bazel": "153042249c7060536dc95b6bb9f9bb8063b8a0b0cb7acdb381bddbc2374aed55", + "https://bcr.bazel.build/modules/rules_jvm_external/6.7/MODULE.bazel": "e717beabc4d091ecb2c803c2d341b88590e9116b8bf7947915eeb33aab4f96dd", + "https://bcr.bazel.build/modules/rules_jvm_external/6.7/source.json": "5426f412d0a7fc6b611643376c7e4a82dec991491b9ce5cb1cfdd25fe2e92be4", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/MODULE.bazel": "d269a01a18ee74d0335450b10f62c9ed81f2321d7958a2934e44272fe82dcef3", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/source.json": "2faa4794364282db7c06600b7e5e34867a564ae91bda7cae7c29c64e9466b7d5", + "https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0", + "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d", + "https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c", + "https://bcr.bazel.build/modules/rules_license/1.0.0/source.json": "a52c89e54cc311196e478f8382df91c15f7a2bfdf4c6cd0e2675cc2ff0b56efb", + "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc", + "https://bcr.bazel.build/modules/rules_pkg/1.0.1/MODULE.bazel": "5b1df97dbc29623bccdf2b0dcd0f5cb08e2f2c9050aab1092fd39a41e82686ff", + "https://bcr.bazel.build/modules/rules_pkg/1.0.1/source.json": "bd82e5d7b9ce2d31e380dd9f50c111d678c3bdaca190cb76b0e1c71b05e1ba8a", + "https://bcr.bazel.build/modules/rules_proto/4.0.0/MODULE.bazel": "a7a7b6ce9bee418c1a760b3d84f83a299ad6952f9903c67f19e4edd964894e06", + "https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7", + "https://bcr.bazel.build/modules/rules_proto/6.0.0-rc1/MODULE.bazel": "1e5b502e2e1a9e825eef74476a5a1ee524a92297085015a052510b09a1a09483", + "https://bcr.bazel.build/modules/rules_proto/6.0.2/MODULE.bazel": "ce916b775a62b90b61888052a416ccdda405212b6aaeb39522f7dc53431a5e73", + "https://bcr.bazel.build/modules/rules_proto/7.1.0/MODULE.bazel": "002d62d9108f75bb807cd56245d45648f38275cb3a99dcd45dfb864c5d74cb96", + "https://bcr.bazel.build/modules/rules_proto/7.1.0/source.json": "39f89066c12c24097854e8f57ab8558929f9c8d474d34b2c00ac04630ad8940e", + "https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f", + "https://bcr.bazel.build/modules/rules_python/0.23.1/MODULE.bazel": "49ffccf0511cb8414de28321f5fcf2a31312b47c40cc21577144b7447f2bf300", + "https://bcr.bazel.build/modules/rules_python/0.25.0/MODULE.bazel": "72f1506841c920a1afec76975b35312410eea3aa7b63267436bfb1dd91d2d382", + "https://bcr.bazel.build/modules/rules_python/0.28.0/MODULE.bazel": "cba2573d870babc976664a912539b320cbaa7114cd3e8f053c720171cde331ed", + "https://bcr.bazel.build/modules/rules_python/0.31.0/MODULE.bazel": "93a43dc47ee570e6ec9f5779b2e64c1476a6ce921c48cc9a1678a91dd5f8fd58", + "https://bcr.bazel.build/modules/rules_python/0.33.2/MODULE.bazel": "3e036c4ad8d804a4dad897d333d8dce200d943df4827cb849840055be8d2e937", + "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c", + "https://bcr.bazel.build/modules/rules_python/1.3.0/MODULE.bazel": "8361d57eafb67c09b75bf4bbe6be360e1b8f4f18118ab48037f2bd50aa2ccb13", + "https://bcr.bazel.build/modules/rules_python/1.4.1/MODULE.bazel": "8991ad45bdc25018301d6b7e1d3626afc3c8af8aaf4bc04f23d0b99c938b73a6", + "https://bcr.bazel.build/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8", + "https://bcr.bazel.build/modules/rules_python/1.7.0/MODULE.bazel": "d01f995ecd137abf30238ad9ce97f8fc3ac57289c8b24bd0bf53324d937a14f8", + "https://bcr.bazel.build/modules/rules_python/1.7.0/source.json": "028a084b65dcf8f4dc4f82f8778dbe65df133f234b316828a82e060d81bdce32", + "https://bcr.bazel.build/modules/rules_rust/0.71.3/MODULE.bazel": "e2390c96f77d65f00c769bf665678c5424188e9c777239cfaae2a8d2dde7b981", + "https://bcr.bazel.build/modules/rules_rust/0.71.3/source.json": "5eb5d8068571725bc893045f8137ed7937988f23d73c53ea443470e8047598ad", + "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c", + "https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b", + "https://bcr.bazel.build/modules/rules_shell/0.6.1/MODULE.bazel": "72e76b0eea4e81611ef5452aa82b3da34caca0c8b7b5c0c9584338aa93bae26b", + "https://bcr.bazel.build/modules/rules_shell/0.6.1/source.json": "20ec05cd5e592055e214b2da8ccb283c7f2a421ea0dc2acbf1aa792e11c03d0c", + "https://bcr.bazel.build/modules/rules_swift/1.16.0/MODULE.bazel": "4a09f199545a60d09895e8281362b1ff3bb08bbde69c6fc87aff5b92fcc916ca", + "https://bcr.bazel.build/modules/rules_swift/2.1.1/MODULE.bazel": "494900a80f944fc7aa61500c2073d9729dff0b764f0e89b824eb746959bc1046", + "https://bcr.bazel.build/modules/rules_swift/2.4.0/MODULE.bazel": "1639617eb1ede28d774d967a738b4a68b0accb40650beadb57c21846beab5efd", + "https://bcr.bazel.build/modules/rules_swift/3.1.2/MODULE.bazel": "72c8f5cf9d26427cee6c76c8e3853eb46ce6b0412a081b2b6db6e8ad56267400", + "https://bcr.bazel.build/modules/rules_swift/3.1.2/source.json": "e85761f3098a6faf40b8187695e3de6d97944e98abd0d8ce579cb2daf6319a66", + "https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8", + "https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c", + "https://bcr.bazel.build/modules/stardoc/0.7.0/MODULE.bazel": "05e3d6d30c099b6770e97da986c53bd31844d7f13d41412480ea265ac9e8079c", + "https://bcr.bazel.build/modules/stardoc/0.7.2/MODULE.bazel": "fc152419aa2ea0f51c29583fab1e8c99ddefd5b3778421845606ee628629e0e5", + "https://bcr.bazel.build/modules/stardoc/0.8.1/MODULE.bazel": "176fef488dce8e5943c8fac37eade418b80b3846fdfd69f0457165375b6b0e68", + "https://bcr.bazel.build/modules/stardoc/0.8.1/source.json": "96482be3dc73e845e2dabb94103121d57a0f3f49663aa4cc4150b44c68fb4a55", + "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.1/MODULE.bazel": "5e463fbfba7b1701d957555ed45097d7f984211330106ccd1352c6e0af0dcf91", + "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.2/MODULE.bazel": "75aab2373a4bbe2a1260b9bf2a1ebbdbf872d3bd36f80bff058dccd82e89422f", + "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.2/source.json": "5fba48bbe0ba48761f9e9f75f92876cafb5d07c0ce059cc7a8027416de94a05b", + "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", + "https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/MODULE.bazel": "eec517b5bbe5492629466e11dae908d043364302283de25581e3eb944326c4ca", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/source.json": "22bc55c47af97246cfc093d0acf683a7869377de362b5d1c552c2c2e16b7a806", + "https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198" + }, + "selectedYankedVersions": {}, + "moduleExtensions": { + "@@rules_kotlin+//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": { + "general": { + "bzlTransitiveDigest": "WDuVCwqV73DvcHB5Of+02lhUZgPxr9MqtpvMRyUi0eQ=", + "usagesDigest": "QI2z8ZUR+mqtbwsf2fLqYdJAkPOHdOV+tF2yVAUgRzw=", + "recordedInputs": [ + "REPO_MAPPING:rules_kotlin+,bazel_tools bazel_tools" + ], + "generatedRepoSpecs": { + "com_github_jetbrains_kotlin_git": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_compiler_git_repository", + "attributes": { + "urls": [ + "https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip" + ], + "sha256": "93137d3aab9afa9b27cb06a824c2324195c6b6f6179d8a8653f440f5bd58be88" + } + }, + "com_github_jetbrains_kotlin": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_capabilities_repository", + "attributes": { + "git_repository_name": "com_github_jetbrains_kotlin_git", + "compiler_version": "1.9.23" + } + }, + "com_github_google_ksp": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:ksp.bzl%ksp_compiler_plugin_repository", + "attributes": { + "urls": [ + "https://github.com/google/ksp/releases/download/1.9.23-1.0.20/artifacts.zip" + ], + "sha256": "ee0618755913ef7fd6511288a232e8fad24838b9af6ea73972a76e81053c8c2d", + "strip_version": "1.9.23-1.0.20" + } + }, + "com_github_pinterest_ktlint": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_file", + "attributes": { + "sha256": "01b2e0ef893383a50dbeb13970fe7fa3be36ca3e83259e01649945b09d736985", + "urls": [ + "https://github.com/pinterest/ktlint/releases/download/1.3.0/ktlint" + ], + "executable": true + } + }, + "rules_android": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "sha256": "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", + "strip_prefix": "rules_android-0.1.1", + "urls": [ + "https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip" + ] + } + } + } + } + }, + "@@rules_python+//python/extensions:config.bzl%config": { + "general": { + "bzlTransitiveDigest": "L+2ZCpb7GIJqvWaXpzkfk/80d916sIFVmSPzrSm6of8=", + "usagesDigest": "ZVSXMAGpD+xzVNPuvF1IoLBkty7TROO0+akMapt1pAg=", + "recordedInputs": [ + "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_python+,pypi__build rules_python++config+pypi__build", + "REPO_MAPPING:rules_python+,pypi__click rules_python++config+pypi__click", + "REPO_MAPPING:rules_python+,pypi__colorama rules_python++config+pypi__colorama", + "REPO_MAPPING:rules_python+,pypi__importlib_metadata rules_python++config+pypi__importlib_metadata", + "REPO_MAPPING:rules_python+,pypi__installer rules_python++config+pypi__installer", + "REPO_MAPPING:rules_python+,pypi__more_itertools rules_python++config+pypi__more_itertools", + "REPO_MAPPING:rules_python+,pypi__packaging rules_python++config+pypi__packaging", + "REPO_MAPPING:rules_python+,pypi__pep517 rules_python++config+pypi__pep517", + "REPO_MAPPING:rules_python+,pypi__pip rules_python++config+pypi__pip", + "REPO_MAPPING:rules_python+,pypi__pip_tools rules_python++config+pypi__pip_tools", + "REPO_MAPPING:rules_python+,pypi__pyproject_hooks rules_python++config+pypi__pyproject_hooks", + "REPO_MAPPING:rules_python+,pypi__setuptools rules_python++config+pypi__setuptools", + "REPO_MAPPING:rules_python+,pypi__tomli rules_python++config+pypi__tomli", + "REPO_MAPPING:rules_python+,pypi__wheel rules_python++config+pypi__wheel", + "REPO_MAPPING:rules_python+,pypi__zipp rules_python++config+pypi__zipp" + ], + "generatedRepoSpecs": { + "rules_python_internal": { + "repoRuleId": "@@rules_python+//python/private:internal_config_repo.bzl%internal_config_repo", + "attributes": { + "transition_setting_generators": {}, + "transition_settings": [] + } + }, + "pypi__build": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/e2/03/f3c8ba0a6b6e30d7d18c40faab90807c9bb5e9a1e3b2fe2008af624a9c97/build-1.2.1-py3-none-any.whl", + "sha256": "75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__click": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__colorama": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", + "sha256": "4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__importlib_metadata": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/2d/0a/679461c511447ffaf176567d5c496d1de27cbe34a87df6677d7171b2fbd4/importlib_metadata-7.1.0-py3-none-any.whl", + "sha256": "30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__installer": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/e5/ca/1172b6638d52f2d6caa2dd262ec4c811ba59eee96d54a7701930726bce18/installer-0.7.0-py3-none-any.whl", + "sha256": "05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__more_itertools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/50/e2/8e10e465ee3987bb7c9ab69efb91d867d93959095f4807db102d07995d94/more_itertools-10.2.0-py3-none-any.whl", + "sha256": "686b06abe565edfab151cb8fd385a05651e1fdf8f0a14191e4439283421f8684", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__packaging": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl", + "sha256": "2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pep517": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/25/6e/ca4a5434eb0e502210f591b97537d322546e4833dcb4d470a48c375c5540/pep517-0.13.1-py3-none-any.whl", + "sha256": "31b206f67165b3536dd577c5c3f1518e8fbaf38cbc57efff8369a392feff1721", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pip": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl", + "sha256": "ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pip_tools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/0d/dc/38f4ce065e92c66f058ea7a368a9c5de4e702272b479c0992059f7693941/pip_tools-7.4.1-py3-none-any.whl", + "sha256": "4c690e5fbae2f21e87843e89c26191f0d9454f362d8acdbd695716493ec8b3a9", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pyproject_hooks": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/ae/f3/431b9d5fe7d14af7a32340792ef43b8a714e7726f1d7b69cc4e8e7a3f1d7/pyproject_hooks-1.1.0-py3-none-any.whl", + "sha256": "7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__setuptools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/90/99/158ad0609729111163fc1f674a5a42f2605371a4cf036d0441070e2f7455/setuptools-78.1.1-py3-none-any.whl", + "sha256": "c3a9c4211ff4c309edb8b8c4f1cbfa7ae324c4ba9f91ff254e3d305b9fd54561", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__tomli": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl", + "sha256": "939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__wheel": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/7d/cd/d7460c9a869b16c3dd4e1e403cce337df165368c71d6af229a74699622ce/wheel-0.43.0-py3-none-any.whl", + "sha256": "55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__zipp": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/da/55/a03fd7240714916507e1fcf7ae355bd9d9ed2e6db492595f1a67f61681be/zipp-3.18.2-py3-none-any.whl", + "sha256": "dce197b859eb796242b0622af1b8beb0a722d52aa2f57133ead08edd5bf5374e", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + } + } + } + }, + "@@rules_python+//python/uv:uv.bzl%uv": { + "general": { + "bzlTransitiveDigest": "IgkgxNrtlAec7OnaFrWoCC5NQhHcY/aIz4jsqcNMm8Y=", + "usagesDigest": "H8dQoNZcoqP+Mu0tHZTi4KHATzvNkM5ePuEqoQdklIU=", + "recordedInputs": [ + "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_python+,platforms platforms" + ], + "generatedRepoSpecs": { + "uv": { + "repoRuleId": "@@rules_python+//python/uv/private:uv_toolchains_repo.bzl%uv_toolchains_repo", + "attributes": { + "toolchain_type": "'@@rules_python+//python/uv:uv_toolchain_type'", + "toolchain_names": [ + "none" + ], + "toolchain_implementations": { + "none": "'@@rules_python+//python:none'" + }, + "toolchain_compatible_with": { + "none": [ + "@platforms//:incompatible" + ] + }, + "toolchain_target_settings": {} + } + } + } + } + } + }, + "facts": {}, + "factsVersions": {} +} diff --git a/rust/defs.bzl b/rust/defs.bzl new file mode 100644 index 0000000..c2f4022 --- /dev/null +++ b/rust/defs.bzl @@ -0,0 +1,166 @@ +load("@rules_runfile_codegen_core//internal:rules.bzl", "runfile_codegen") +load("@rules_rust//rust:defs.bzl", "rust_library") + +def rust_runfile(name, target = None, targets = None, doc = "", base = None, type = "auto"): + """Creates a runfile entry configuration for Rust code generation. + + This helper function constructs a structured dictionary representing a single runfile + dependency. It is intended to be passed in the `entries` list of `rust_runfile_library`. + + Args: + name: The name of the generated `pub static`, in upper snake case (e.g., + `CONFIG_JSON`, `HELPER_TOOL`). Its type is `runfile::FileSpec`, + `runfile::ExecutableSpec`, `runfile::DirectorySpec`, or + `runfile::FileSetSpec`, depending on the target. + target: The Bazel target label of the runfile. Alias for `targets = [target]`. + targets: A list of Bazel target labels to include in this entry. If multiple + targets are specified, this entry is automatically treated as a file set. + doc: The doc comment for the generated static. + base: An optional path base to resolve relative paths for file set files. + - If set to `""` (empty string), nothing is stripped (keeps full canonical paths). + - If it starts with `//`, it is resolved relative to the library's repository root. + - If it starts with `@`, it resolves relative to an external repository. + - If it starts with `.`, it resolves relative to the library's package path. + - If set to `"common_dir"`, it automatically computes the longest common prefix. + type: An optional explicit type assertion for the target. + - `"auto"` (default): Automatically detects the type (file, directory, or fileset). + - `"file"`: Asserts the target is a single file. + - `"directory"`: Asserts the target is a TreeArtifact directory. + - `"fileset"`: Forces the target to be treated as a file set. + - `"executable"`: Asserts the target is an executable binary. + + Returns: + A dictionary containing the configured runfile entry. + """ + if target != None and targets != None: + fail("Cannot specify both 'target' and 'targets' for runfile '%s'" % name) + if target == None and targets == None: + fail("Must specify either 'target' or 'targets' for runfile '%s'" % name) + + resolved_targets = targets + if resolved_targets == None: + resolved_targets = [target] + + resolved_base = base + if base != None and (base.startswith("@") or base.startswith("//")): + resolved_base = str(native.package_relative_label(base)) + + return { + "name": name, + "targets": resolved_targets, + "doc": doc, + "base": resolved_base, + "type": type, + } + +def rust_runfile_library(name, entries, **kwargs): + """Generates a Rust crate containing typed accessors for runfiles. + + The generated crate has one `pub static` per entry. Each static is an + unresolved spec from the `runfile` crate + (`@rules_runfile_codegen_rust//runfile`), which looks runfiles up with + `@rules_rust//rust/runfiles`. Declaring a spec does no I/O. Call + `resolve()` to get a `Result`, or `must_resolve()` to panic on a missing + runfile. A resolved executable has `command()`, which returns a + `std::process::Command` that passes the runfiles environment to the child. + + The generated source is formatted as `rustfmt` formats it, and every public + item has a doc comment. + + ### Example Usage + + In your `BUILD.bazel`: + + ```bazel + load("@rules_runfile_codegen_rust//:defs.bzl", "rust_runfile", "rust_runfile_library") + + rust_runfile_library( + name = "my_runfiles", + entries = [ + rust_runfile( + name = "CONFIG_JSON", + target = "//config:config.json", + doc = "The main configuration file.", + ), + rust_runfile( + name = "HELPER_TOOL", + target = "//tools:helper_tool", # An executable target + doc = "A helper CLI tool.", + ), + ], + ) + ``` + + In your `main.rs`: + + ```rust + fn main() -> Result<(), Box> { + let config = my_runfiles::CONFIG_JSON.resolve()?; + let text = std::fs::read_to_string(config.path())?; + + let status = my_runfiles::HELPER_TOOL.must_resolve().command().arg("--verbose").status()?; + Ok(()) + } + ``` + + Args: + name: A unique name for this target. The generated `rust_library` has this + name, and its crate name defaults to it. + entries: A list of runfile entries, constructed using the `rust_runfile` helper. + **kwargs: Additional arguments to propagate to the underlying `rust_library` + target, such as `crate_name` or `edition` (default `"2021"`). + """ + if "srcs" in kwargs or "crate_root" in kwargs: + fail("Cannot specify 'srcs' or 'crate_root' in rust_runfile_library, they are generated automatically.") + + # 1. Collect and deduplicate targets + unique_targets = [] + target_to_idx = {} + for entry in entries: + for t in entry["targets"]: + if t not in target_to_idx: + target_to_idx[t] = len(unique_targets) + unique_targets.append(t) + + # 2. Build structured config + config_data = {} + for entry in entries: + config_data[entry["name"]] = { + "target_indexes": [target_to_idx[t] for t in entry["targets"]], + "doc": entry["doc"], + "base": entry["base"] if entry.get("base") != None else "__default__", + "type": entry.get("type", "auto"), + } + + # Propagate testonly and tags + testonly = kwargs.get("testonly", None) + tags = kwargs.get("tags", None) + + # Merge data and deps + user_data = kwargs.pop("data", []) + user_deps = kwargs.pop("deps", []) + edition = kwargs.pop("edition", "2021") + + # Call the core generator rule + runfile_codegen( + name = name + "_codegen", + package = kwargs.get("crate_name", name), + language = "rust", + targets = unique_targets, + config = json.encode(config_data), + testonly = testonly, + tags = tags, + ) + + # Public Rust library + rust_library( + name = name, + srcs = [":" + name + "_codegen"], + crate_root = ":" + name + "_codegen", + edition = edition, + deps = [ + "@rules_runfile_codegen_rust//runfile", + ] + user_deps, + data = unique_targets + user_data, + **kwargs + ) diff --git a/rust/docs/BUILD.bazel b/rust/docs/BUILD.bazel new file mode 100644 index 0000000..ce2e5af --- /dev/null +++ b/rust/docs/BUILD.bazel @@ -0,0 +1,17 @@ +load("@stardoc//stardoc:stardoc.bzl", "stardoc") +load("@bazel_skylib//rules:diff_test.bzl", "diff_test") + +package(default_visibility = ["//visibility:public"]) + +stardoc( + name = "defs_doc", + input = "//:defs.bzl", + out = "defs.md.gen", + deps = ["//:defs_bzl"], +) + +diff_test( + name = "verify_docs", + file1 = "defs.md", + file2 = "defs.md.gen", +) diff --git a/rust/docs/defs.md b/rust/docs/defs.md new file mode 100644 index 0000000..822dacb --- /dev/null +++ b/rust/docs/defs.md @@ -0,0 +1,107 @@ + + + + + + +## rust_runfile + +
+load("@rules_runfile_codegen_rust//:defs.bzl", "rust_runfile")
+
+rust_runfile(name, target, targets, doc, base, type)
+
+ +Creates a runfile entry configuration for Rust code generation. + +This helper function constructs a structured dictionary representing a single runfile +dependency. It is intended to be passed in the `entries` list of `rust_runfile_library`. + + +**PARAMETERS** + + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| name | The name of the generated `pub static`, in upper snake case (e.g., `CONFIG_JSON`, `HELPER_TOOL`). Its type is `runfile::FileSpec`, `runfile::ExecutableSpec`, `runfile::DirectorySpec`, or `runfile::FileSetSpec`, depending on the target. | none | +| target | The Bazel target label of the runfile. Alias for `targets = [target]`. | `None` | +| targets | A list of Bazel target labels to include in this entry. If multiple targets are specified, this entry is automatically treated as a file set. | `None` | +| doc | The doc comment for the generated static. | `""` | +| base | An optional path base to resolve relative paths for file set files. - If set to `""` (empty string), nothing is stripped (keeps full canonical paths). - If it starts with `//`, it is resolved relative to the library's repository root. - If it starts with `@`, it resolves relative to an external repository. - If it starts with `.`, it resolves relative to the library's package path. - If set to `"common_dir"`, it automatically computes the longest common prefix. | `None` | +| type | An optional explicit type assertion for the target. - `"auto"` (default): Automatically detects the type (file, directory, or fileset). - `"file"`: Asserts the target is a single file. - `"directory"`: Asserts the target is a TreeArtifact directory. - `"fileset"`: Forces the target to be treated as a file set. - `"executable"`: Asserts the target is an executable binary. | `"auto"` | + +**RETURNS** + +A dictionary containing the configured runfile entry. + + + + +## rust_runfile_library + +
+load("@rules_runfile_codegen_rust//:defs.bzl", "rust_runfile_library")
+
+rust_runfile_library(name, entries, **kwargs)
+
+ +Generates a Rust crate containing typed accessors for runfiles. + +The generated crate has one `pub static` per entry. Each static is an +unresolved spec from the `runfile` crate +(`@rules_runfile_codegen_rust//runfile`), which looks runfiles up with +`@rules_rust//rust/runfiles`. Declaring a spec does no I/O. Call +`resolve()` to get a `Result`, or `must_resolve()` to panic on a missing +runfile. A resolved executable has `command()`, which returns a +`std::process::Command` that passes the runfiles environment to the child. + +The generated source is formatted as `rustfmt` formats it, and every public +item has a doc comment. + +### Example Usage + +In your `BUILD.bazel`: + +```bazel +load("@rules_runfile_codegen_rust//:defs.bzl", "rust_runfile", "rust_runfile_library") + +rust_runfile_library( + name = "my_runfiles", + entries = [ + rust_runfile( + name = "CONFIG_JSON", + target = "//config:config.json", + doc = "The main configuration file.", + ), + rust_runfile( + name = "HELPER_TOOL", + target = "//tools:helper_tool", # An executable target + doc = "A helper CLI tool.", + ), + ], +) +``` + +In your `main.rs`: + +```rust +fn main() -> Result<(), Box> { + let config = my_runfiles::CONFIG_JSON.resolve()?; + let text = std::fs::read_to_string(config.path())?; + + let status = my_runfiles::HELPER_TOOL.must_resolve().command().arg("--verbose").status()?; + Ok(()) +} +``` + + +**PARAMETERS** + + +| Name | Description | Default Value | +| :------------- | :------------- | :------------- | +| name | A unique name for this target. The generated `rust_library` has this name, and its crate name defaults to it. | none | +| entries | A list of runfile entries, constructed using the `rust_runfile` helper. | none | +| kwargs | Additional arguments to propagate to the underlying `rust_library` target, such as `crate_name` or `edition` (default `"2021"`). | none | + + diff --git a/rust/runfile/BUILD.bazel b/rust/runfile/BUILD.bazel new file mode 100644 index 0000000..1a11266 --- /dev/null +++ b/rust/runfile/BUILD.bazel @@ -0,0 +1,23 @@ +load("@rules_rust//rust:defs.bzl", "rust_doc_test", "rust_library", "rust_test") + +rust_library( + name = "runfile", + srcs = ["runfile.rs"], + edition = "2021", + visibility = ["//visibility:public"], + deps = [ + "@rules_rust//rust/runfiles", + ], +) + +rust_test( + name = "runfile_test", + srcs = ["runfile_test.rs"], + edition = "2021", + deps = [":runfile"], +) + +rust_doc_test( + name = "runfile_doc_test", + crate = ":runfile", +) diff --git a/rust/runfile/runfile.rs b/rust/runfile/runfile.rs new file mode 100644 index 0000000..2ae52fa --- /dev/null +++ b/rust/runfile/runfile.rs @@ -0,0 +1,478 @@ +//! Typed access to Bazel runfiles. +//! +//! Code generated by `rust_runfile_library` declares one static spec per +//! runfile: a [`FileSpec`], [`ExecutableSpec`], [`DirectorySpec`], or +//! [`FileSetSpec`]. A spec holds only the runfile's rlocation path, so +//! declaring it does no I/O. Calling `resolve()` looks the runfile up and +//! returns a resolved [`File`], [`Executable`], [`Directory`], or [`FileSet`]. +//! Resolution is the only step that can fail. +//! +//! Lookups go through the [`runfiles`] crate from +//! [rules_rust](https://github.com/bazelbuild/rules_rust/tree/main/rust/runfiles). +//! It supports both a runfiles directory and a manifest-only setup. +//! +//! For background on rlocation paths and the runfiles tree, see +//! [Bazel runfiles](https://bazel.build/extending/rules#runfiles). + +use std::collections::BTreeMap; +use std::ffi::OsString; +use std::fmt; +use std::path::{Path, PathBuf}; +use std::process::Command; +use std::sync::{Arc, OnceLock}; + +const RUNFILES_DIR: &str = "RUNFILES_DIR"; +const RUNFILES_MANIFEST_FILE: &str = "RUNFILES_MANIFEST_FILE"; +const JAVA_RUNFILES: &str = "JAVA_RUNFILES"; + +/// The error returned when a runfile cannot be resolved. +#[derive(Debug, Clone)] +#[non_exhaustive] +pub enum Error { + /// The default resolver could not find the runfiles directory or + /// manifest of the running program. + Init(Arc), + /// The runfile is not in the runfiles directory or manifest. + NotFound { + /// The rlocation path that was looked up. + rlocation_path: String, + }, + /// A relative path was requested from a [`FileSet`] that does not + /// contain it. + NotInFileSet { + /// The relative path that was requested. + rel_path: String, + }, +} + +impl fmt::Display for Error { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Error::Init(err) => write!(f, "cannot initialize Bazel runfiles: {err}"), + Error::NotFound { rlocation_path } => { + write!(f, "runfile {rlocation_path:?} not found") + } + Error::NotInFileSet { rel_path } => { + write!(f, "file {rel_path:?} is not in this file set") + } + } + } +} + +impl std::error::Error for Error { + fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { + match self { + Error::Init(err) => Some(err.as_ref()), + _ => None, + } + } +} + +/// Looks up runfiles by rlocation path. +/// +/// [`BazelRunfiles`] is the implementation used by `resolve()`. Pass another +/// implementation to `resolve_with()` to substitute paths in unit tests. +pub trait Resolver { + /// Returns the path of the runfile at `rlocation_path`, or `None` if the + /// runfile is unknown. + /// + /// `rlocation_path` is canonical: it starts with a canonical repository + /// name such as `_main`. The returned path does not have to exist; the + /// caller checks that. + fn rlocation(&self, rlocation_path: &str) -> Option; + + /// Returns the environment variables that let a child process find the + /// same runfiles. + /// + /// The default returns no variables. + fn env_vars(&self) -> Vec<(OsString, OsString)> { + Vec::new() + } +} + +/// The runfiles of the running program, found the way Bazel describes for +/// [runfiles libraries](https://bazel.build/extending/rules#runfiles). +#[derive(Debug)] +pub struct BazelRunfiles { + runfiles: runfiles::Runfiles, + env: Vec<(OsString, OsString)>, +} + +impl BazelRunfiles { + /// Finds the runfiles of the running program. + /// + /// It uses `RUNFILES_MANIFEST_FILE` if set, then `RUNFILES_DIR` or + /// `TEST_SRCDIR`, then a `.runfiles` directory or + /// `.runfiles_manifest` file next to the program. + pub fn create() -> Result { + let runfiles = runfiles::Runfiles::create().map_err(|err| Error::Init(Arc::new(err)))?; + Ok(BazelRunfiles { + runfiles, + env: child_env(), + }) + } +} + +impl Resolver for BazelRunfiles { + fn rlocation(&self, rlocation_path: &str) -> Option { + // Generated rlocation paths are canonical, so no repository mapping + // applies. + let path = self.runfiles.rlocation(rlocation_path)?; + Some(std::path::absolute(&path).unwrap_or(path)) + } + + fn env_vars(&self) -> Vec<(OsString, OsString)> { + self.env.clone() + } +} + +/// Computes the runfiles variables for a child process. +/// +/// The paths are made absolute so that a child started in another working +/// directory still finds them. +fn child_env() -> Vec<(OsString, OsString)> { + let mut env = Vec::new(); + let mut push = |key: &str, path: &Path| { + let path = std::path::absolute(path).unwrap_or_else(|_| path.to_path_buf()); + env.push((OsString::from(key), path.into_os_string())); + }; + + if let Some(manifest) = std::env::var_os(RUNFILES_MANIFEST_FILE).filter(|v| !v.is_empty()) { + push(RUNFILES_MANIFEST_FILE, Path::new(&manifest)); + if let Some(dir) = std::env::var_os(RUNFILES_DIR).filter(|v| !v.is_empty()) { + push(RUNFILES_DIR, Path::new(&dir)); + } + } else if let Ok(dir) = runfiles::find_runfiles_dir() { + push(RUNFILES_DIR, &dir); + push(JAVA_RUNFILES, &dir); + let manifest = dir.join("MANIFEST"); + if manifest.is_file() { + push(RUNFILES_MANIFEST_FILE, &manifest); + } + } else if let Some(manifest) = manifest_next_to_program() { + push(RUNFILES_MANIFEST_FILE, &manifest); + } + env +} + +/// Returns `.runfiles_manifest` if it exists, checking `argv[0]` +/// and then the resolved executable path. +fn manifest_next_to_program() -> Option { + let argv0 = std::env::args_os().next().map(PathBuf::from); + let exe = std::env::current_exe().ok(); + argv0.into_iter().chain(exe).find_map(|program| { + let mut name = program.file_name()?.to_owned(); + name.push(".runfiles_manifest"); + let manifest = program.with_file_name(name); + manifest.is_file().then_some(manifest) + }) +} + +/// Returns the shared [`BazelRunfiles`] of the running program. +/// +/// The first call finds the runfiles. Later calls return the same value, or +/// the same error. +pub fn default_resolver() -> Result<&'static BazelRunfiles, Error> { + static DEFAULT: OnceLock> = OnceLock::new(); + DEFAULT + .get_or_init(BazelRunfiles::create) + .as_ref() + .map_err(Clone::clone) +} + +fn lookup(resolver: &dyn Resolver, rlocation_path: &str) -> Result { + match resolver.rlocation(rlocation_path) { + Some(path) if path.exists() => Ok(File { + rlocation_path: rlocation_path.to_owned(), + path, + }), + _ => Err(Error::NotFound { + rlocation_path: rlocation_path.to_owned(), + }), + } +} + +/// An unresolved runfile that is a single file. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct FileSpec { + rlocation_path: &'static str, +} + +impl FileSpec { + /// Creates a spec for the runfile at the canonical `rlocation_path`. + pub const fn new(rlocation_path: &'static str) -> Self { + FileSpec { rlocation_path } + } + + /// Returns the canonical rlocation path, for example + /// `_main/data/config.json`. + pub const fn rlocation_path(&self) -> &'static str { + self.rlocation_path + } + + /// Finds the runfile using [`default_resolver`]. + pub fn resolve(&self) -> Result { + self.resolve_with(default_resolver()?) + } + + /// Finds the runfile using `resolver`. + pub fn resolve_with(&self, resolver: &dyn Resolver) -> Result { + lookup(resolver, self.rlocation_path) + } + + /// Like [`FileSpec::resolve`], but panics if the runfile is missing. + pub fn must_resolve(&self) -> File { + self.resolve().unwrap_or_else(|err| panic!("{err}")) + } +} + +/// A runfile that was found on disk. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct File { + rlocation_path: String, + path: PathBuf, +} + +impl File { + /// Returns the canonical rlocation path the file was found by. + pub fn rlocation_path(&self) -> &str { + &self.rlocation_path + } + + /// Returns the absolute path of the file. + pub fn path(&self) -> &Path { + &self.path + } +} + +impl AsRef for File { + fn as_ref(&self) -> &Path { + &self.path + } +} + +/// An unresolved runfile that is an executable target, such as a +/// `rust_binary`. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct ExecutableSpec { + file: FileSpec, +} + +impl ExecutableSpec { + /// Creates a spec for the executable at the canonical `rlocation_path`. + pub const fn new(rlocation_path: &'static str) -> Self { + ExecutableSpec { + file: FileSpec::new(rlocation_path), + } + } + + /// Returns the canonical rlocation path of the executable. + pub const fn rlocation_path(&self) -> &'static str { + self.file.rlocation_path + } + + /// Finds the executable using [`default_resolver`]. + pub fn resolve(&self) -> Result { + self.resolve_with(default_resolver()?) + } + + /// Finds the executable using `resolver`. + /// + /// [`Executable::command`] passes `resolver.env_vars()` to the child. + pub fn resolve_with(&self, resolver: &dyn Resolver) -> Result { + Ok(Executable { + file: self.file.resolve_with(resolver)?, + env: resolver.env_vars(), + }) + } + + /// Like [`ExecutableSpec::resolve`], but panics if the executable is + /// missing. + pub fn must_resolve(&self) -> Executable { + self.resolve().unwrap_or_else(|err| panic!("{err}")) + } +} + +/// An executable runfile that was found on disk. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Executable { + file: File, + env: Vec<(OsString, OsString)>, +} + +impl Executable { + /// Returns the canonical rlocation path the executable was found by. + pub fn rlocation_path(&self) -> &str { + self.file.rlocation_path() + } + + /// Returns the absolute path of the executable. + pub fn path(&self) -> &Path { + self.file.path() + } + + /// Returns a [`Command`] that runs the executable. + /// + /// The command sets `RUNFILES_DIR` or `RUNFILES_MANIFEST_FILE` (and + /// `JAVA_RUNFILES` with a directory) so that the child finds its own + /// runfiles, which Bazel places in the parent's runfiles tree. + pub fn command(&self) -> Command { + let mut command = Command::new(self.path()); + command.envs(self.env.iter().map(|(k, v)| (k, v))); + command + } +} + +/// An unresolved runfile that is a directory, produced by a rule that +/// declares a [tree artifact](https://bazel.build/extending/rules#tree_artifacts). +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct DirectorySpec { + file: FileSpec, +} + +impl DirectorySpec { + /// Creates a spec for the directory at the canonical `rlocation_path`. + pub const fn new(rlocation_path: &'static str) -> Self { + DirectorySpec { + file: FileSpec::new(rlocation_path), + } + } + + /// Returns the canonical rlocation path of the directory. + pub const fn rlocation_path(&self) -> &'static str { + self.file.rlocation_path + } + + /// Finds the directory using [`default_resolver`]. + pub fn resolve(&self) -> Result { + self.resolve_with(default_resolver()?) + } + + /// Finds the directory using `resolver`. + pub fn resolve_with(&self, resolver: &dyn Resolver) -> Result { + Ok(Directory { + file: self.file.resolve_with(resolver)?, + }) + } + + /// Like [`DirectorySpec::resolve`], but panics if the directory is + /// missing. + pub fn must_resolve(&self) -> Directory { + self.resolve().unwrap_or_else(|err| panic!("{err}")) + } +} + +/// A directory runfile that was found on disk. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct Directory { + file: File, +} + +impl Directory { + /// Returns the canonical rlocation path the directory was found by. + pub fn rlocation_path(&self) -> &str { + self.file.rlocation_path() + } + + /// Returns the absolute path of the directory. + pub fn path(&self) -> &Path { + self.file.path() + } + + /// Returns the file at `rel_path` inside the directory. + /// + /// This joins paths and does not check that the file exists. + pub fn child(&self, rel_path: &str) -> File { + File { + rlocation_path: format!("{}/{}", self.file.rlocation_path, rel_path), + path: self.file.path.join(rel_path), + } + } +} + +/// An unresolved set of runfiles, keyed by a path relative to the set's base. +/// +/// Generated code builds one with [`file_set!`]. +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub struct FileSetSpec { + files: &'static [(&'static str, &'static str)], +} + +impl FileSetSpec { + /// Creates a spec from `(relative path, canonical rlocation path)` pairs. + pub const fn new(files: &'static [(&'static str, &'static str)]) -> Self { + FileSetSpec { files } + } + + /// Returns the `(relative path, canonical rlocation path)` pairs. + pub const fn files(&self) -> &'static [(&'static str, &'static str)] { + self.files + } + + /// Finds every file in the set using [`default_resolver`]. + pub fn resolve(&self) -> Result { + self.resolve_with(default_resolver()?) + } + + /// Finds every file in the set using `resolver`. + pub fn resolve_with(&self, resolver: &dyn Resolver) -> Result { + let files = self + .files + .iter() + .map(|(rel, rlocation_path)| Ok((*rel, lookup(resolver, rlocation_path)?))) + .collect::>()?; + Ok(FileSet { files }) + } + + /// Like [`FileSetSpec::resolve`], but panics if a file is missing. + pub fn must_resolve(&self) -> FileSet { + self.resolve().unwrap_or_else(|err| panic!("{err}")) + } +} + +/// Builds a [`FileSetSpec`] in a `static` from `"relative path" => +/// "rlocation path"` pairs. +/// +/// ``` +/// static DATA: runfile::FileSetSpec = runfile::file_set! { +/// "a.txt" => "_main/data/a.txt", +/// "b.txt" => "_main/data/b.txt", +/// }; +/// assert_eq!(DATA.files().len(), 2); +/// ``` +#[macro_export] +macro_rules! file_set { + ($($rel:literal => $rlocation_path:literal),* $(,)?) => { + $crate::FileSetSpec::new(&[$(($rel, $rlocation_path)),*]) + }; +} + +/// A set of runfiles that were all found on disk. +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct FileSet { + files: BTreeMap<&'static str, File>, +} + +impl FileSet { + /// Returns the relative paths in the set, in sorted order. + pub fn rel_paths(&self) -> impl Iterator + '_ { + self.files.keys().copied() + } + + /// Returns the file at `rel_path`. + pub fn file(&self, rel_path: &str) -> Result<&File, Error> { + self.files.get(rel_path).ok_or_else(|| Error::NotInFileSet { + rel_path: rel_path.to_owned(), + }) + } + + /// Like [`FileSet::file`], but panics if the set has no such file. + pub fn must_file(&self, rel_path: &str) -> &File { + self.file(rel_path).unwrap_or_else(|err| panic!("{err}")) + } + + /// Returns the `(relative path, file)` pairs, sorted by relative path. + pub fn iter(&self) -> impl Iterator + '_ { + self.files.iter().map(|(rel, file)| (*rel, file)) + } +} diff --git a/rust/runfile/runfile_test.rs b/rust/runfile/runfile_test.rs new file mode 100644 index 0000000..73fc829 --- /dev/null +++ b/rust/runfile/runfile_test.rs @@ -0,0 +1,142 @@ +//! Unit tests for the `runfile` crate, using a map-backed resolver. + +use std::collections::HashMap; +use std::ffi::OsString; +use std::path::PathBuf; + +use runfile::{DirectorySpec, Error, ExecutableSpec, FileSetSpec, FileSpec, Resolver}; + +/// Resolves rlocation paths from a fixed map. +struct MapResolver { + paths: HashMap<&'static str, PathBuf>, + env: Vec<(OsString, OsString)>, +} + +impl Resolver for MapResolver { + fn rlocation(&self, rlocation_path: &str) -> Option { + self.paths.get(rlocation_path).cloned() + } + + fn env_vars(&self) -> Vec<(OsString, OsString)> { + self.env.clone() + } +} + +/// Creates a scratch directory with `a.txt`, `b.txt` and `dir/c.txt`, and a +/// resolver that maps `ws/...` rlocation paths to them. +fn fixture(name: &str) -> (PathBuf, MapResolver) { + let root = PathBuf::from(std::env::var_os("TEST_TMPDIR").expect("TEST_TMPDIR")).join(name); + std::fs::create_dir_all(root.join("dir")).unwrap(); + std::fs::write(root.join("a.txt"), "a").unwrap(); + std::fs::write(root.join("b.txt"), "b").unwrap(); + std::fs::write(root.join("dir/c.txt"), "c").unwrap(); + let paths = HashMap::from([ + ("ws/a.txt", root.join("a.txt")), + ("ws/b.txt", root.join("b.txt")), + ("ws/dir", root.join("dir")), + // Known to the resolver but absent on disk. + ("ws/gone.txt", root.join("gone.txt")), + ]); + let env = vec![(OsString::from("RUNFILES_DIR"), OsString::from("/runfiles"))]; + (root, MapResolver { paths, env }) +} + +#[test] +fn file_resolves() { + let (root, resolver) = fixture("file_resolves"); + let file = FileSpec::new("ws/a.txt").resolve_with(&resolver).unwrap(); + assert_eq!(file.path(), root.join("a.txt")); + assert_eq!(file.rlocation_path(), "ws/a.txt"); +} + +#[test] +fn file_unknown_to_resolver_is_not_found() { + let (_, resolver) = fixture("file_unknown"); + let err = FileSpec::new("ws/nope.txt") + .resolve_with(&resolver) + .unwrap_err(); + assert!( + matches!(&err, Error::NotFound { rlocation_path } if rlocation_path == "ws/nope.txt"), + "{err:?}" + ); + assert_eq!(err.to_string(), r#"runfile "ws/nope.txt" not found"#); +} + +#[test] +fn file_missing_on_disk_is_not_found() { + let (_, resolver) = fixture("file_missing"); + let err = FileSpec::new("ws/gone.txt") + .resolve_with(&resolver) + .unwrap_err(); + assert!(matches!(err, Error::NotFound { .. }), "{err:?}"); +} + +#[test] +fn executable_command_carries_resolver_env() { + let (root, resolver) = fixture("executable_env"); + let exe = ExecutableSpec::new("ws/a.txt") + .resolve_with(&resolver) + .unwrap(); + let command = exe.command(); + assert_eq!(command.get_program(), root.join("a.txt").as_os_str()); + let envs: Vec<_> = command.get_envs().collect(); + assert_eq!( + envs, + vec![( + OsString::from("RUNFILES_DIR").as_os_str(), + Some(OsString::from("/runfiles").as_os_str()) + )] + ); +} + +#[test] +fn directory_child_joins_paths() { + let (root, resolver) = fixture("directory_child"); + let dir = DirectorySpec::new("ws/dir") + .resolve_with(&resolver) + .unwrap(); + let child = dir.child("c.txt"); + assert_eq!(child.path(), root.join("dir/c.txt")); + assert_eq!(child.rlocation_path(), "ws/dir/c.txt"); + assert_eq!(std::fs::read_to_string(child.path()).unwrap(), "c"); +} + +static SET: FileSetSpec = runfile::file_set! { + "b.txt" => "ws/b.txt", + "a.txt" => "ws/a.txt", +}; + +#[test] +fn file_set_resolves_every_file() { + let (root, resolver) = fixture("file_set"); + let set = SET.resolve_with(&resolver).unwrap(); + assert_eq!(set.rel_paths().collect::>(), ["a.txt", "b.txt"]); + assert_eq!(set.file("b.txt").unwrap().path(), root.join("b.txt")); + let err = set.file("c.txt").unwrap_err(); + assert!( + matches!(&err, Error::NotInFileSet { rel_path } if rel_path == "c.txt"), + "{err:?}" + ); +} + +#[test] +fn file_set_fails_if_any_file_is_missing() { + let (_, resolver) = fixture("file_set_missing"); + static PARTIAL: FileSetSpec = runfile::file_set! { + "a.txt" => "ws/a.txt", + "gone.txt" => "ws/gone.txt", + }; + let err = PARTIAL.resolve_with(&resolver).unwrap_err(); + assert!( + matches!(&err, Error::NotFound { rlocation_path } if rlocation_path == "ws/gone.txt"), + "{err:?}" + ); +} + +#[test] +#[should_panic(expected = "runfile \"ws/nope.txt\" not found")] +fn must_resolve_panics_with_the_error() { + // The test binary has runfiles, so the default resolver initializes and + // the lookup itself fails. + FileSpec::new("ws/nope.txt").must_resolve(); +} diff --git a/tests/rust/.bazelrc b/tests/rust/.bazelrc new file mode 100644 index 0000000..14aa2dd --- /dev/null +++ b/tests/rust/.bazelrc @@ -0,0 +1,2 @@ +# Fail the clippy check on any warning, including a missing doc comment. +build --@rules_rust//rust/settings:clippy_flags=-Dwarnings,-Dmissing_docs diff --git a/tests/rust/BUILD.bazel b/tests/rust/BUILD.bazel new file mode 100644 index 0000000..d7deb28 --- /dev/null +++ b/tests/rust/BUILD.bazel @@ -0,0 +1,256 @@ +load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_clippy", "rust_test") +load("@rules_runfile_codegen_rust//:defs.bzl", "rust_runfile", "rust_runfile_library") +load("//:rules.bzl", "dir_producer") + +package(default_visibility = ["//visibility:private"]) + +# An executable that reads its own runfile. +rust_binary( + name = "helper_bin", + srcs = ["helper_bin.rs"], + data = ["data/helper_data.txt"], + deps = ["@rules_rust//rust/runfiles"], +) + +# Consolidated filegroups (proving duplicate target mapping works) +filegroup( + name = "collection_data", + srcs = [ + "data/collection/file1.txt", + "data/collection/file2.txt", + ], +) + +dir_producer( + name = "dir_data", +) + +filegroup( + name = "wrapped_dir", + srcs = [":dir_data"], +) + +filegroup( + name = "strict_file_data", + srcs = ["data/dummy.txt"], +) + +dir_producer( + name = "strict_dir_data", +) + +filegroup( + name = "forced_col_data", + srcs = ["data/dummy.txt"], +) + +filegroup( + name = "mixed_collection", + srcs = [ + ":dir_data", + "data/dummy.txt", + ], +) + +genrule( + name = "gen_data", + outs = ["data/gen_data.txt"], + cmd = "echo 'generated' > $@", +) + +filegroup( + name = "distant_collection", + srcs = [ + "data/dummy.txt", + "@rules_rust//:MODULE.bazel", + ], +) + +rust_runfile_library( + name = "test_resources", + entries = [ + rust_runfile( + name = "SINGLE_FILE", + doc = "A single data file.", + target = "data/dummy.txt", + ), + rust_runfile( + name = "EXECUTABLE_FILE", + doc = "An executable tool.", + target = ":helper_bin", + ), + rust_runfile( + name = "EXPLICIT_EXECUTABLE", + doc = "An executable with explicit type assertion.", + target = ":helper_bin", + type = "executable", + ), + rust_runfile( + name = "EXTERNAL_FILE", + doc = "An external file from rules_rust.", + target = "@rules_rust//:MODULE.bazel", + ), + rust_runfile( + name = "GROUP_DATA", + doc = "A fileset of files with explicit relative base.", + target = ":collection_data", + base = "./data/collection", + ), + rust_runfile( + name = "GROUP_DATA_DEFAULT", + doc = "A fileset of files with default base (library package).", + target = ":collection_data", + ), + rust_runfile( + name = "DIR_DATA", + doc = "A directory of files.", + target = ":dir_data", + ), + rust_runfile( + name = "WRAPPED_DIR", + doc = "A directory wrapped in a filegroup.", + target = ":wrapped_dir", + ), + rust_runfile( + name = "MIXED_GROUP", + doc = "A mix of directory and file.", + target = ":mixed_collection", + ), + rust_runfile( + name = "GEN_DATA", + doc = "Generated data file.", + target = ":gen_data", + ), + rust_runfile( + name = "DISTANT_GROUP", + doc = "A fileset of files from different repos.", + target = ":distant_collection", + ), + rust_runfile( + name = "DISTANT_GROUP_FILTERED", + doc = "A fileset of files from different repos, filtered to only include main repo files under data/.", + target = ":distant_collection", + base = "//data", + ), + rust_runfile( + name = "DISTANT_GROUP_UNFILTERED", + doc = "A fileset of files from different repos, unfiltered (strip_prefix = '').", + target = ":distant_collection", + base = "", + ), + rust_runfile( + name = "MOCK_REPO_GROUP", + doc = "A fileset from external repo with repo-relative base.", + targets = ["@mock_repo//:files"], + base = "@mock_repo//data", + ), + rust_runfile( + name = "SUB_GROUP_PACKAGE_RELATIVE", + doc = "Subdir fileset with package-relative base.", + target = "//subdir:sub_collection1", + base = "./subdir/sub_data", + ), + rust_runfile( + name = "SUB_GROUP_REPO_RELATIVE", + doc = "Subdir fileset with repo-relative base.", + target = "//subdir:sub_collection2", + base = "//subdir/sub_data", + ), + rust_runfile( + name = "STRICT_FILE", + doc = "A file with explicit type assertion.", + target = ":strict_file_data", + type = "file", + ), + rust_runfile( + name = "STRICT_DIR", + doc = "A directory with explicit type assertion.", + target = ":strict_dir_data", + type = "directory", + ), + rust_runfile( + name = "STRICT_FILE_SET", + doc = "A fileset with explicit type assertion.", + target = ":collection_data", + base = "./data/collection", + type = "fileset", + ), + rust_runfile( + name = "FORCED_FILE_SET", + doc = "A single file forced to be a fileset.", + target = ":forced_col_data", + type = "fileset", + ), + rust_runfile( + name = "COMMON_DIR_FILE_SET", + doc = "A fileset using common_dir base.", + target = ":collection_data", + base = "common_dir", + ), + # Test duplicate targets mapping under different configurations + rust_runfile( + name = "DUPLICATE_TARGET1", + doc = "First mapping of collection_data with strip.", + target = ":collection_data", + base = "./data/collection", + ), + rust_runfile( + name = "DUPLICATE_TARGET2", + doc = "Second mapping of collection_data keeping full path.", + target = ":collection_data", + base = "", + ), + # Test multiple targets merged into a single fileset + rust_runfile( + name = "MIXED_FILE_SET", + doc = "A fileset merging local collection and subdir collection.", + targets = [ + ":collection_data", + "//subdir:sub_collection2", + ], + base = "common_dir", + ), + ], +) + +rust_test( + name = "integration_test", + srcs = ["integration_test.rs"], + deps = [ + ":test_resources", + "@rules_runfile_codegen_rust//runfile", + ], +) + +# The generated crate must pass clippy with -Dwarnings and -Dmissing_docs +# (set in .bazelrc). Building this target runs the check. +rust_clippy( + name = "test_resources_clippy", + testonly = True, + deps = [":test_resources"], +) + +# Runfiles for the rustfmt check: the rustfmt wrapper from the Rust toolchain +# and the generated source. +rust_runfile_library( + name = "format_check_resources", + testonly = True, + entries = [ + rust_runfile( + name = "RUSTFMT", + doc = "rustfmt from the registered Rust toolchain.", + target = "@rules_rust//tools/upstream_wrapper:rustfmt", + ), + rust_runfile( + name = "GENERATED_SOURCE", + doc = "The source generated for `:test_resources`.", + target = ":test_resources_codegen", + ), + ], +) + +rust_test( + name = "format_test", + srcs = ["format_test.rs"], + deps = [":format_check_resources"], +) diff --git a/tests/rust/MODULE.bazel b/tests/rust/MODULE.bazel new file mode 100644 index 0000000..0983234 --- /dev/null +++ b/tests/rust/MODULE.bazel @@ -0,0 +1,33 @@ +module( + name = "rules_runfile_codegen_rust_tests", + version = "0.0.0", +) + +bazel_dep(name = "rules_rust", version = "0.71.3") +bazel_dep(name = "rules_runfile_codegen_rust", version = "0.0.0") +bazel_dep(name = "rules_runfile_codegen_core", version = "0.0.0") + +local_path_override( + module_name = "rules_runfile_codegen_rust", + path = "../../rust", +) + +local_path_override( + module_name = "rules_runfile_codegen_core", + path = "../../core", +) + +bazel_dep(name = "mock_repo", version = "0.0.0") +local_path_override( + module_name = "mock_repo", + path = "mock_repo", +) + +rust = use_extension("@rules_rust//rust:extensions.bzl", "rust") +rust.toolchain( + edition = "2021", + versions = ["1.88.0"], +) +use_repo(rust, "rust_toolchains") + +register_toolchains("@rust_toolchains//:all") diff --git a/tests/rust/MODULE.bazel.lock b/tests/rust/MODULE.bazel.lock new file mode 100644 index 0000000..0e38632 --- /dev/null +++ b/tests/rust/MODULE.bazel.lock @@ -0,0 +1,458 @@ +{ + "lockFileVersion": 28, + "registryFileHashes": { + "https://bcr.bazel.build/bazel_registry.json": "8a28e4aff06ee60aed2a8c281907fb8bcbf3b753c91fb5a5c57da3215d5b3497", + "https://bcr.bazel.build/modules/abseil-cpp/20210324.2/MODULE.bazel": "7cd0312e064fde87c8d1cd79ba06c876bd23630c83466e9500321be55c96ace2", + "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/MODULE.bazel": "70390338f7a5106231d20620712f7cccb659cd0e9d073d1991c038eb9fc57589", + "https://bcr.bazel.build/modules/abseil-cpp/20230125.1/MODULE.bazel": "89047429cb0207707b2dface14ba7f8df85273d484c2572755be4bab7ce9c3a0", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.0.bcr.1/MODULE.bazel": "1c8cec495288dccd14fdae6e3f95f772c1c91857047a098fad772034264cc8cb", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.0/MODULE.bazel": "d253ae36a8bd9ee3c5955384096ccb6baf16a1b1e93e858370da0a3b94f77c16", + "https://bcr.bazel.build/modules/abseil-cpp/20230802.1/MODULE.bazel": "fa92e2eb41a04df73cdabeec37107316f7e5272650f81d6cc096418fe647b915", + "https://bcr.bazel.build/modules/abseil-cpp/20240116.1/MODULE.bazel": "37bcdb4440fbb61df6a1c296ae01b327f19e9bb521f9b8e26ec854b6f97309ed", + "https://bcr.bazel.build/modules/abseil-cpp/20240116.2/MODULE.bazel": "73939767a4686cd9a520d16af5ab440071ed75cec1a876bf2fcfaf1f71987a16", + "https://bcr.bazel.build/modules/abseil-cpp/20250127.1/MODULE.bazel": "c4a89e7ceb9bf1e25cf84a9f830ff6b817b72874088bf5141b314726e46a57c1", + "https://bcr.bazel.build/modules/abseil-cpp/20250512.1/MODULE.bazel": "d209fdb6f36ffaf61c509fcc81b19e81b411a999a934a032e10cd009a0226215", + "https://bcr.bazel.build/modules/abseil-cpp/20250814.1/MODULE.bazel": "51f2312901470cdab0dbdf3b88c40cd21c62a7ed58a3de45b365ddc5b11bcab2", + "https://bcr.bazel.build/modules/abseil-cpp/20250814.1/source.json": "cea3901d7e299da7320700abbaafe57a65d039f10d0d7ea601c4a66938ea4b0c", + "https://bcr.bazel.build/modules/apple_support/1.11.1/MODULE.bazel": "1843d7cd8a58369a444fc6000e7304425fba600ff641592161d9f15b179fb896", + "https://bcr.bazel.build/modules/apple_support/1.15.1/MODULE.bazel": "a0556fefca0b1bb2de8567b8827518f94db6a6e7e7d632b4c48dc5f865bc7c85", + "https://bcr.bazel.build/modules/apple_support/1.21.0/MODULE.bazel": "ac1824ed5edf17dee2fdd4927ada30c9f8c3b520be1b5fd02a5da15bc10bff3e", + "https://bcr.bazel.build/modules/apple_support/1.21.1/MODULE.bazel": "5809fa3efab15d1f3c3c635af6974044bac8a4919c62238cce06acee8a8c11f1", + "https://bcr.bazel.build/modules/apple_support/1.24.1/MODULE.bazel": "f46e8ddad60aef170ee92b2f3d00ef66c147ceafea68b6877cb45bd91737f5f8", + "https://bcr.bazel.build/modules/apple_support/2.5.2/MODULE.bazel": "bb1b7081e390a8d3885f642cb0073dfcf8e7a36525e079fa8f5835af7079c0fe", + "https://bcr.bazel.build/modules/apple_support/2.5.2/source.json": "dd51ee925a550e92b55eb41c4c809a967da311a2d2520241252a238a48b39c4c", + "https://bcr.bazel.build/modules/bazel_features/1.1.1/MODULE.bazel": "27b8c79ef57efe08efccbd9dd6ef70d61b4798320b8d3c134fd571f78963dbcd", + "https://bcr.bazel.build/modules/bazel_features/1.10.0/MODULE.bazel": "f75e8807570484a99be90abcd52b5e1f390362c258bcb73106f4544957a48101", + "https://bcr.bazel.build/modules/bazel_features/1.11.0/MODULE.bazel": "f9382337dd5a474c3b7d334c2f83e50b6eaedc284253334cf823044a26de03e8", + "https://bcr.bazel.build/modules/bazel_features/1.15.0/MODULE.bazel": "d38ff6e517149dc509406aca0db3ad1efdd890a85e049585b7234d04238e2a4d", + "https://bcr.bazel.build/modules/bazel_features/1.17.0/MODULE.bazel": "039de32d21b816b47bd42c778e0454217e9c9caac4a3cf8e15c7231ee3ddee4d", + "https://bcr.bazel.build/modules/bazel_features/1.18.0/MODULE.bazel": "1be0ae2557ab3a72a57aeb31b29be347bcdc5d2b1eb1e70f39e3851a7e97041a", + "https://bcr.bazel.build/modules/bazel_features/1.19.0/MODULE.bazel": "59adcdf28230d220f0067b1f435b8537dd033bfff8db21335ef9217919c7fb58", + "https://bcr.bazel.build/modules/bazel_features/1.21.0/MODULE.bazel": "675642261665d8eea09989aa3b8afb5c37627f1be178382c320d1b46afba5e3b", + "https://bcr.bazel.build/modules/bazel_features/1.23.0/MODULE.bazel": "fd1ac84bc4e97a5a0816b7fd7d4d4f6d837b0047cf4cbd81652d616af3a6591a", + "https://bcr.bazel.build/modules/bazel_features/1.27.0/MODULE.bazel": "621eeee06c4458a9121d1f104efb80f39d34deff4984e778359c60eaf1a8cb65", + "https://bcr.bazel.build/modules/bazel_features/1.28.0/MODULE.bazel": "4b4200e6cbf8fa335b2c3f43e1d6ef3e240319c33d43d60cc0fbd4b87ece299d", + "https://bcr.bazel.build/modules/bazel_features/1.3.0/MODULE.bazel": "cdcafe83ec318cda34e02948e81d790aab8df7a929cec6f6969f13a489ccecd9", + "https://bcr.bazel.build/modules/bazel_features/1.30.0/MODULE.bazel": "a14b62d05969a293b80257e72e597c2da7f717e1e69fa8b339703ed6731bec87", + "https://bcr.bazel.build/modules/bazel_features/1.33.0/MODULE.bazel": "8b8dc9d2a4c88609409c3191165bccec0e4cb044cd7a72ccbe826583303459f6", + "https://bcr.bazel.build/modules/bazel_features/1.4.1/MODULE.bazel": "e45b6bb2350aff3e442ae1111c555e27eac1d915e77775f6fdc4b351b758b5d7", + "https://bcr.bazel.build/modules/bazel_features/1.42.1/MODULE.bazel": "275a59b5406ff18c01739860aa70ad7ccb3cfb474579411decca11c93b951080", + "https://bcr.bazel.build/modules/bazel_features/1.50.0/MODULE.bazel": "2083ef9c7a469f520890483ccf8e0189d6e71e2117e7752e15e6554433d5ae3e", + "https://bcr.bazel.build/modules/bazel_features/1.50.0/source.json": "e0ee3debde2789ff56e4452e612d126925ba9ab64d4bde79c67f099d2902df9b", + "https://bcr.bazel.build/modules/bazel_features/1.9.1/MODULE.bazel": "8f679097876a9b609ad1f60249c49d68bfab783dd9be012faf9d82547b14815a", + "https://bcr.bazel.build/modules/bazel_skylib/1.0.3/MODULE.bazel": "bcb0fd896384802d1ad283b4e4eb4d718eebd8cb820b0a2c3a347fb971afd9d8", + "https://bcr.bazel.build/modules/bazel_skylib/1.1.1/MODULE.bazel": "1add3e7d93ff2e6998f9e118022c84d163917d912f5afafb3058e3d2f1545b5e", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.0/MODULE.bazel": "44fe84260e454ed94ad326352a698422dbe372b21a1ac9f3eab76eb531223686", + "https://bcr.bazel.build/modules/bazel_skylib/1.2.1/MODULE.bazel": "f35baf9da0efe45fa3da1696ae906eea3d615ad41e2e3def4aeb4e8bc0ef9a7a", + "https://bcr.bazel.build/modules/bazel_skylib/1.3.0/MODULE.bazel": "20228b92868bf5cfc41bda7afc8a8ba2a543201851de39d990ec957b513579c5", + "https://bcr.bazel.build/modules/bazel_skylib/1.4.1/MODULE.bazel": "a0dcb779424be33100dcae821e9e27e4f2901d9dfd5333efe5ac6a8d7ab75e1d", + "https://bcr.bazel.build/modules/bazel_skylib/1.4.2/MODULE.bazel": "3bd40978e7a1fac911d5989e6b09d8f64921865a45822d8b09e815eaa726a651", + "https://bcr.bazel.build/modules/bazel_skylib/1.5.0/MODULE.bazel": "32880f5e2945ce6a03d1fbd588e9198c0a959bb42297b2cfaf1685b7bc32e138", + "https://bcr.bazel.build/modules/bazel_skylib/1.6.1/MODULE.bazel": "8fdee2dbaace6c252131c00e1de4b165dc65af02ea278476187765e1a617b917", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.0/MODULE.bazel": "0db596f4563de7938de764cc8deeabec291f55e8ec15299718b93c4423e9796d", + "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b", + "https://bcr.bazel.build/modules/bazel_skylib/1.8.1/MODULE.bazel": "88ade7293becda963e0e3ea33e7d54d3425127e0a326e0d17da085a5f1f03ff6", + "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67", + "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/source.json": "34a3c8bcf233b835eb74be9d628899bb32999d3e0eadef1947a0a562a2b16ffb", + "https://bcr.bazel.build/modules/buildozer/8.5.1/MODULE.bazel": "a35d9561b3fc5b18797c330793e99e3b834a473d5fbd3d7d7634aafc9bdb6f8f", + "https://bcr.bazel.build/modules/buildozer/8.5.1/source.json": "e3386e6ff4529f2442800dee47ad28d3e6487f36a1f75ae39ae56c70f0cd2fbd", + "https://bcr.bazel.build/modules/google_benchmark/1.8.2/MODULE.bazel": "a70cf1bba851000ba93b58ae2f6d76490a9feb74192e57ab8e8ff13c34ec50cb", + "https://bcr.bazel.build/modules/googletest/1.11.0/MODULE.bazel": "3a83f095183f66345ca86aa13c58b59f9f94a2f81999c093d4eeaa2d262d12f4", + "https://bcr.bazel.build/modules/googletest/1.14.0.bcr.1/MODULE.bazel": "22c31a561553727960057361aa33bf20fb2e98584bc4fec007906e27053f80c6", + "https://bcr.bazel.build/modules/googletest/1.14.0/MODULE.bazel": "cfbcbf3e6eac06ef9d85900f64424708cc08687d1b527f0ef65aa7517af8118f", + "https://bcr.bazel.build/modules/googletest/1.15.2/MODULE.bazel": "6de1edc1d26cafb0ea1a6ab3f4d4192d91a312fd2d360b63adaa213cd00b2108", + "https://bcr.bazel.build/modules/googletest/1.17.0/MODULE.bazel": "dbec758171594a705933a29fcf69293d2468c49ec1f2ebca65c36f504d72df46", + "https://bcr.bazel.build/modules/googletest/1.17.0/source.json": "38e4454b25fc30f15439c0378e57909ab1fd0a443158aa35aec685da727cd713", + "https://bcr.bazel.build/modules/jsoncpp/1.9.5/MODULE.bazel": "31271aedc59e815656f5736f282bb7509a97c7ecb43e927ac1a37966e0578075", + "https://bcr.bazel.build/modules/jsoncpp/1.9.6/MODULE.bazel": "2f8d20d3b7d54143213c4dfc3d98225c42de7d666011528dc8fe91591e2e17b0", + "https://bcr.bazel.build/modules/jsoncpp/1.9.6/source.json": "a04756d367a2126c3541682864ecec52f92cdee80a35735a3cb249ce015ca000", + "https://bcr.bazel.build/modules/libpfm/4.11.0/MODULE.bazel": "45061ff025b301940f1e30d2c16bea596c25b176c8b6b3087e92615adbd52902", + "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/MODULE.bazel": "6f7b417dcc794d9add9e556673ad25cb3ba835224290f4f848f8e2db1e1fca74", + "https://bcr.bazel.build/modules/nlohmann_json/3.6.1/source.json": "f448c6e8963fdfa7eb831457df83ad63d3d6355018f6574fb017e8169deb43a9", + "https://bcr.bazel.build/modules/package_metadata/0.0.3/MODULE.bazel": "77890552ecea9e284b5424c9de827a58099348763a4359e975c359a83d4faa83", + "https://bcr.bazel.build/modules/package_metadata/0.0.3/source.json": "742075a428ad12a3fa18a69014c2f57f01af910c6d9d18646c990200853e641a", + "https://bcr.bazel.build/modules/platforms/0.0.10/MODULE.bazel": "8cb8efaf200bdeb2150d93e162c40f388529a25852b332cec879373771e48ed5", + "https://bcr.bazel.build/modules/platforms/0.0.11/MODULE.bazel": "0daefc49732e227caa8bfa834d65dc52e8cc18a2faf80df25e8caea151a9413f", + "https://bcr.bazel.build/modules/platforms/0.0.4/MODULE.bazel": "9b328e31ee156f53f3c416a64f8491f7eb731742655a47c9eec4703a71644aee", + "https://bcr.bazel.build/modules/platforms/0.0.5/MODULE.bazel": "5733b54ea419d5eaf7997054bb55f6a1d0b5ff8aedf0176fef9eea44f3acda37", + "https://bcr.bazel.build/modules/platforms/0.0.6/MODULE.bazel": "ad6eeef431dc52aefd2d77ed20a4b353f8ebf0f4ecdd26a807d2da5aa8cd0615", + "https://bcr.bazel.build/modules/platforms/0.0.7/MODULE.bazel": "72fd4a0ede9ee5c021f6a8dd92b503e089f46c227ba2813ff183b71616034814", + "https://bcr.bazel.build/modules/platforms/0.0.8/MODULE.bazel": "9f142c03e348f6d263719f5074b21ef3adf0b139ee4c5133e2aa35664da9eb2d", + "https://bcr.bazel.build/modules/platforms/0.0.9/MODULE.bazel": "4a87a60c927b56ddd67db50c89acaa62f4ce2a1d2149ccb63ffd871d5ce29ebc", + "https://bcr.bazel.build/modules/platforms/1.0.0/MODULE.bazel": "f05feb42b48f1b3c225e4ccf351f367be0371411a803198ec34a389fb22aa580", + "https://bcr.bazel.build/modules/platforms/1.1.0/MODULE.bazel": "1c0c09f5bdcf4b3f924720d2478a3711cb39f4977019ca5988685e5b7e18b3d2", + "https://bcr.bazel.build/modules/platforms/1.1.0/source.json": "fcf351c47596c939140ab0d333dfdd08ed1ea6ce33c2fe70c12493a301cf1344", + "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel": "a5a29bb89544f9b97edce05642fac225a808b5b7be74038ea3640fae2f8e66a7", + "https://bcr.bazel.build/modules/protobuf/27.0/MODULE.bazel": "7873b60be88844a0a1d8f80b9d5d20cfbd8495a689b8763e76c6372998d3f64c", + "https://bcr.bazel.build/modules/protobuf/29.0-rc2/MODULE.bazel": "6241d35983510143049943fc0d57937937122baf1b287862f9dc8590fc4c37df", + "https://bcr.bazel.build/modules/protobuf/29.0-rc3/MODULE.bazel": "33c2dfa286578573afc55a7acaea3cada4122b9631007c594bf0729f41c8de92", + "https://bcr.bazel.build/modules/protobuf/29.1/MODULE.bazel": "557c3457560ff49e122ed76c0bc3397a64af9574691cb8201b4e46d4ab2ecb95", + "https://bcr.bazel.build/modules/protobuf/3.19.0/MODULE.bazel": "6b5fbb433f760a99a22b18b6850ed5784ef0e9928a72668b66e4d7ccd47db9b0", + "https://bcr.bazel.build/modules/protobuf/32.1/MODULE.bazel": "89cd2866a9cb07fee9ff74c41ceace11554f32e0d849de4e23ac55515cfada4d", + "https://bcr.bazel.build/modules/protobuf/33.4/MODULE.bazel": "114775b816b38b6d0ca620450d6b02550c60ceedfdc8d9a229833b34a223dc42", + "https://bcr.bazel.build/modules/protobuf/33.4/source.json": "555f8686b4c7d6b5ba731fbea13bf656b4bfd9a7ff629c1d9d3f6e1d6155de79", + "https://bcr.bazel.build/modules/pybind11_bazel/2.11.1/MODULE.bazel": "88af1c246226d87e65be78ed49ecd1e6f5e98648558c14ce99176da041dc378e", + "https://bcr.bazel.build/modules/pybind11_bazel/2.12.0/MODULE.bazel": "e6f4c20442eaa7c90d7190d8dc539d0ab422f95c65a57cc59562170c58ae3d34", + "https://bcr.bazel.build/modules/pybind11_bazel/2.12.0/source.json": "6900fdc8a9e95866b8c0d4ad4aba4d4236317b5c1cd04c502df3f0d33afed680", + "https://bcr.bazel.build/modules/re2/2023-09-01/MODULE.bazel": "cb3d511531b16cfc78a225a9e2136007a48cf8a677e4264baeab57fe78a80206", + "https://bcr.bazel.build/modules/re2/2024-07-02.bcr.1/MODULE.bazel": "b4963dda9b31080be1905ef085ecd7dd6cd47c05c79b9cdf83ade83ab2ab271a", + "https://bcr.bazel.build/modules/re2/2024-07-02.bcr.1/source.json": "2ff292be6ef3340325ce8a045ecc326e92cbfab47c7cbab4bd85d28971b97ac4", + "https://bcr.bazel.build/modules/re2/2024-07-02/MODULE.bazel": "0eadc4395959969297cbcf31a249ff457f2f1d456228c67719480205aa306daa", + "https://bcr.bazel.build/modules/rules_android/0.1.1/MODULE.bazel": "48809ab0091b07ad0182defb787c4c5328bd3a278938415c00a7b69b50c4d3a8", + "https://bcr.bazel.build/modules/rules_android/0.1.1/source.json": "e6986b41626ee10bdc864937ffb6d6bf275bb5b9c65120e6137d56e6331f089e", + "https://bcr.bazel.build/modules/rules_apple/3.16.0/MODULE.bazel": "0d1caf0b8375942ce98ea944be754a18874041e4e0459401d925577624d3a54a", + "https://bcr.bazel.build/modules/rules_apple/4.1.0/MODULE.bazel": "76e10fd4a48038d3fc7c5dc6e63b7063bbf5304a2e3bd42edda6ec660eebea68", + "https://bcr.bazel.build/modules/rules_apple/4.1.0/source.json": "8ee81e1708756f81b343a5eb2b2f0b953f1d25c4ab3d4a68dc02754872e80715", + "https://bcr.bazel.build/modules/rules_cc/0.0.1/MODULE.bazel": "cb2aa0747f84c6c3a78dad4e2049c154f08ab9d166b1273835a8174940365647", + "https://bcr.bazel.build/modules/rules_cc/0.0.10/MODULE.bazel": "ec1705118f7eaedd6e118508d3d26deba2a4e76476ada7e0e3965211be012002", + "https://bcr.bazel.build/modules/rules_cc/0.0.13/MODULE.bazel": "0e8529ed7b323dad0775ff924d2ae5af7640b23553dfcd4d34344c7e7a867191", + "https://bcr.bazel.build/modules/rules_cc/0.0.15/MODULE.bazel": "6704c35f7b4a72502ee81f61bf88706b54f06b3cbe5558ac17e2e14666cd5dcc", + "https://bcr.bazel.build/modules/rules_cc/0.0.16/MODULE.bazel": "7661303b8fc1b4d7f532e54e9d6565771fea666fbdf839e0a86affcd02defe87", + "https://bcr.bazel.build/modules/rules_cc/0.0.17/MODULE.bazel": "2ae1d8f4238ec67d7185d8861cb0a2cdf4bc608697c331b95bf990e69b62e64a", + "https://bcr.bazel.build/modules/rules_cc/0.0.2/MODULE.bazel": "6915987c90970493ab97393024c156ea8fb9f3bea953b2f3ec05c34f19b5695c", + "https://bcr.bazel.build/modules/rules_cc/0.0.6/MODULE.bazel": "abf360251023dfe3efcef65ab9d56beefa8394d4176dd29529750e1c57eaa33f", + "https://bcr.bazel.build/modules/rules_cc/0.0.8/MODULE.bazel": "964c85c82cfeb6f3855e6a07054fdb159aced38e99a5eecf7bce9d53990afa3e", + "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel": "836e76439f354b89afe6a911a7adf59a6b2518fafb174483ad78a2a2fde7b1c5", + "https://bcr.bazel.build/modules/rules_cc/0.1.1/MODULE.bazel": "2f0222a6f229f0bf44cd711dc13c858dad98c62d52bd51d8fc3a764a83125513", + "https://bcr.bazel.build/modules/rules_cc/0.1.2/MODULE.bazel": "557ddc3a96858ec0d465a87c0a931054d7dcfd6583af2c7ed3baf494407fd8d0", + "https://bcr.bazel.build/modules/rules_cc/0.1.5/MODULE.bazel": "88dfc9361e8b5ae1008ac38f7cdfd45ad738e4fa676a3ad67d19204f045a1fd8", + "https://bcr.bazel.build/modules/rules_cc/0.2.0/MODULE.bazel": "b5c17f90458caae90d2ccd114c81970062946f49f355610ed89bebf954f5783c", + "https://bcr.bazel.build/modules/rules_cc/0.2.13/MODULE.bazel": "eecdd666eda6be16a8d9dc15e44b5c75133405e820f620a234acc4b1fdc5aa37", + "https://bcr.bazel.build/modules/rules_cc/0.2.15/MODULE.bazel": "6a0a4a75a57aa6dc888300d848053a58c6b12a29f89d4304e1c41448514ec6e8", + "https://bcr.bazel.build/modules/rules_cc/0.2.17/MODULE.bazel": "1849602c86cb60da8613d2de887f9566a6d354a6df6d7009f9d04a14402f9a84", + "https://bcr.bazel.build/modules/rules_cc/0.2.17/source.json": "3832f45d145354049137c0090df04629d9c2b5493dc5c2bf46f1834040133a07", + "https://bcr.bazel.build/modules/rules_cc/0.2.4/MODULE.bazel": "1ff1223dfd24f3ecf8f028446d4a27608aa43c3f41e346d22838a4223980b8cc", + "https://bcr.bazel.build/modules/rules_cc/0.2.8/MODULE.bazel": "f1df20f0bf22c28192a794f29b501ee2018fa37a3862a1a2132ae2940a23a642", + "https://bcr.bazel.build/modules/rules_foreign_cc/0.9.0/MODULE.bazel": "c9e8c682bf75b0e7c704166d79b599f93b72cfca5ad7477df596947891feeef6", + "https://bcr.bazel.build/modules/rules_fuzzing/0.5.2/MODULE.bazel": "40c97d1144356f52905566c55811f13b299453a14ac7769dfba2ac38192337a8", + "https://bcr.bazel.build/modules/rules_java/4.0.0/MODULE.bazel": "5a78a7ae82cd1a33cef56dc578c7d2a46ed0dca12643ee45edbb8417899e6f74", + "https://bcr.bazel.build/modules/rules_java/5.3.5/MODULE.bazel": "a4ec4f2db570171e3e5eb753276ee4b389bae16b96207e9d3230895c99644b86", + "https://bcr.bazel.build/modules/rules_java/6.5.2/MODULE.bazel": "1d440d262d0e08453fa0c4d8f699ba81609ed0e9a9a0f02cd10b3e7942e61e31", + "https://bcr.bazel.build/modules/rules_java/7.10.0/MODULE.bazel": "530c3beb3067e870561739f1144329a21c851ff771cd752a49e06e3dc9c2e71a", + "https://bcr.bazel.build/modules/rules_java/7.12.2/MODULE.bazel": "579c505165ee757a4280ef83cda0150eea193eed3bef50b1004ba88b99da6de6", + "https://bcr.bazel.build/modules/rules_java/7.2.0/MODULE.bazel": "06c0334c9be61e6cef2c8c84a7800cef502063269a5af25ceb100b192453d4ab", + "https://bcr.bazel.build/modules/rules_java/7.6.1/MODULE.bazel": "2f14b7e8a1aa2f67ae92bc69d1ec0fa8d9f827c4e17ff5e5f02e91caa3b2d0fe", + "https://bcr.bazel.build/modules/rules_java/8.3.2/MODULE.bazel": "7336d5511ad5af0b8615fdc7477535a2e4e723a357b6713af439fe8cf0195017", + "https://bcr.bazel.build/modules/rules_java/8.5.1/MODULE.bazel": "d8a9e38cc5228881f7055a6079f6f7821a073df3744d441978e7a43e20226939", + "https://bcr.bazel.build/modules/rules_java/8.6.1/MODULE.bazel": "f4808e2ab5b0197f094cabce9f4b006a27766beb6a9975931da07099560ca9c2", + "https://bcr.bazel.build/modules/rules_java/9.1.0/MODULE.bazel": "ee63f27e36a3fada80342869361182f120a9819c74320e8e65b1e04ba0cd7a9d", + "https://bcr.bazel.build/modules/rules_java/9.1.0/source.json": "da589573c1dee2c9ac4a568b301269a2e8191110ff0345c1a959fa7ea6c4dfd6", + "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel": "a56b85e418c83eb1839819f0b515c431010160383306d13ec21959ac412d2fe7", + "https://bcr.bazel.build/modules/rules_jvm_external/5.1/MODULE.bazel": "33f6f999e03183f7d088c9be518a63467dfd0be94a11d0055fe2d210f89aa909", + "https://bcr.bazel.build/modules/rules_jvm_external/5.2/MODULE.bazel": "d9351ba35217ad0de03816ef3ed63f89d411349353077348a45348b096615036", + "https://bcr.bazel.build/modules/rules_jvm_external/6.3/MODULE.bazel": "c998e060b85f71e00de5ec552019347c8bca255062c990ac02d051bb80a38df0", + "https://bcr.bazel.build/modules/rules_jvm_external/6.7/MODULE.bazel": "e717beabc4d091ecb2c803c2d341b88590e9116b8bf7947915eeb33aab4f96dd", + "https://bcr.bazel.build/modules/rules_jvm_external/6.7/source.json": "5426f412d0a7fc6b611643376c7e4a82dec991491b9ce5cb1cfdd25fe2e92be4", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/MODULE.bazel": "d269a01a18ee74d0335450b10f62c9ed81f2321d7958a2934e44272fe82dcef3", + "https://bcr.bazel.build/modules/rules_kotlin/1.9.6/source.json": "2faa4794364282db7c06600b7e5e34867a564ae91bda7cae7c29c64e9466b7d5", + "https://bcr.bazel.build/modules/rules_license/0.0.3/MODULE.bazel": "627e9ab0247f7d1e05736b59dbb1b6871373de5ad31c3011880b4133cafd4bd0", + "https://bcr.bazel.build/modules/rules_license/0.0.7/MODULE.bazel": "088fbeb0b6a419005b89cf93fe62d9517c0a2b8bb56af3244af65ecfe37e7d5d", + "https://bcr.bazel.build/modules/rules_license/1.0.0/MODULE.bazel": "a7fda60eefdf3d8c827262ba499957e4df06f659330bbe6cdbdb975b768bb65c", + "https://bcr.bazel.build/modules/rules_license/1.0.0/source.json": "a52c89e54cc311196e478f8382df91c15f7a2bfdf4c6cd0e2675cc2ff0b56efb", + "https://bcr.bazel.build/modules/rules_pkg/0.7.0/MODULE.bazel": "df99f03fc7934a4737122518bb87e667e62d780b610910f0447665a7e2be62dc", + "https://bcr.bazel.build/modules/rules_pkg/1.0.1/MODULE.bazel": "5b1df97dbc29623bccdf2b0dcd0f5cb08e2f2c9050aab1092fd39a41e82686ff", + "https://bcr.bazel.build/modules/rules_pkg/1.0.1/source.json": "bd82e5d7b9ce2d31e380dd9f50c111d678c3bdaca190cb76b0e1c71b05e1ba8a", + "https://bcr.bazel.build/modules/rules_proto/4.0.0/MODULE.bazel": "a7a7b6ce9bee418c1a760b3d84f83a299ad6952f9903c67f19e4edd964894e06", + "https://bcr.bazel.build/modules/rules_proto/5.3.0-21.7/MODULE.bazel": "e8dff86b0971688790ae75528fe1813f71809b5afd57facb44dad9e8eca631b7", + "https://bcr.bazel.build/modules/rules_proto/6.0.0-rc1/MODULE.bazel": "1e5b502e2e1a9e825eef74476a5a1ee524a92297085015a052510b09a1a09483", + "https://bcr.bazel.build/modules/rules_proto/6.0.2/MODULE.bazel": "ce916b775a62b90b61888052a416ccdda405212b6aaeb39522f7dc53431a5e73", + "https://bcr.bazel.build/modules/rules_proto/7.1.0/MODULE.bazel": "002d62d9108f75bb807cd56245d45648f38275cb3a99dcd45dfb864c5d74cb96", + "https://bcr.bazel.build/modules/rules_proto/7.1.0/source.json": "39f89066c12c24097854e8f57ab8558929f9c8d474d34b2c00ac04630ad8940e", + "https://bcr.bazel.build/modules/rules_python/0.10.2/MODULE.bazel": "cc82bc96f2997baa545ab3ce73f196d040ffb8756fd2d66125a530031cd90e5f", + "https://bcr.bazel.build/modules/rules_python/0.23.1/MODULE.bazel": "49ffccf0511cb8414de28321f5fcf2a31312b47c40cc21577144b7447f2bf300", + "https://bcr.bazel.build/modules/rules_python/0.25.0/MODULE.bazel": "72f1506841c920a1afec76975b35312410eea3aa7b63267436bfb1dd91d2d382", + "https://bcr.bazel.build/modules/rules_python/0.28.0/MODULE.bazel": "cba2573d870babc976664a912539b320cbaa7114cd3e8f053c720171cde331ed", + "https://bcr.bazel.build/modules/rules_python/0.31.0/MODULE.bazel": "93a43dc47ee570e6ec9f5779b2e64c1476a6ce921c48cc9a1678a91dd5f8fd58", + "https://bcr.bazel.build/modules/rules_python/0.33.2/MODULE.bazel": "3e036c4ad8d804a4dad897d333d8dce200d943df4827cb849840055be8d2e937", + "https://bcr.bazel.build/modules/rules_python/0.4.0/MODULE.bazel": "9208ee05fd48bf09ac60ed269791cf17fb343db56c8226a720fbb1cdf467166c", + "https://bcr.bazel.build/modules/rules_python/1.3.0/MODULE.bazel": "8361d57eafb67c09b75bf4bbe6be360e1b8f4f18118ab48037f2bd50aa2ccb13", + "https://bcr.bazel.build/modules/rules_python/1.4.1/MODULE.bazel": "8991ad45bdc25018301d6b7e1d3626afc3c8af8aaf4bc04f23d0b99c938b73a6", + "https://bcr.bazel.build/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8", + "https://bcr.bazel.build/modules/rules_python/1.7.0/MODULE.bazel": "d01f995ecd137abf30238ad9ce97f8fc3ac57289c8b24bd0bf53324d937a14f8", + "https://bcr.bazel.build/modules/rules_python/1.7.0/source.json": "028a084b65dcf8f4dc4f82f8778dbe65df133f234b316828a82e060d81bdce32", + "https://bcr.bazel.build/modules/rules_rust/0.71.3/MODULE.bazel": "e2390c96f77d65f00c769bf665678c5424188e9c777239cfaae2a8d2dde7b981", + "https://bcr.bazel.build/modules/rules_rust/0.71.3/source.json": "5eb5d8068571725bc893045f8137ed7937988f23d73c53ea443470e8047598ad", + "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c", + "https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b", + "https://bcr.bazel.build/modules/rules_shell/0.6.1/MODULE.bazel": "72e76b0eea4e81611ef5452aa82b3da34caca0c8b7b5c0c9584338aa93bae26b", + "https://bcr.bazel.build/modules/rules_shell/0.6.1/source.json": "20ec05cd5e592055e214b2da8ccb283c7f2a421ea0dc2acbf1aa792e11c03d0c", + "https://bcr.bazel.build/modules/rules_swift/1.16.0/MODULE.bazel": "4a09f199545a60d09895e8281362b1ff3bb08bbde69c6fc87aff5b92fcc916ca", + "https://bcr.bazel.build/modules/rules_swift/2.1.1/MODULE.bazel": "494900a80f944fc7aa61500c2073d9729dff0b764f0e89b824eb746959bc1046", + "https://bcr.bazel.build/modules/rules_swift/2.4.0/MODULE.bazel": "1639617eb1ede28d774d967a738b4a68b0accb40650beadb57c21846beab5efd", + "https://bcr.bazel.build/modules/rules_swift/3.1.2/MODULE.bazel": "72c8f5cf9d26427cee6c76c8e3853eb46ce6b0412a081b2b6db6e8ad56267400", + "https://bcr.bazel.build/modules/rules_swift/3.1.2/source.json": "e85761f3098a6faf40b8187695e3de6d97944e98abd0d8ce579cb2daf6319a66", + "https://bcr.bazel.build/modules/stardoc/0.5.1/MODULE.bazel": "1a05d92974d0c122f5ccf09291442580317cdd859f07a8655f1db9a60374f9f8", + "https://bcr.bazel.build/modules/stardoc/0.5.3/MODULE.bazel": "c7f6948dae6999bf0db32c1858ae345f112cacf98f174c7a8bb707e41b974f1c", + "https://bcr.bazel.build/modules/stardoc/0.7.0/MODULE.bazel": "05e3d6d30c099b6770e97da986c53bd31844d7f13d41412480ea265ac9e8079c", + "https://bcr.bazel.build/modules/stardoc/0.7.2/MODULE.bazel": "fc152419aa2ea0f51c29583fab1e8c99ddefd5b3778421845606ee628629e0e5", + "https://bcr.bazel.build/modules/stardoc/0.7.2/source.json": "58b029e5e901d6802967754adf0a9056747e8176f017cfe3607c0851f4d42216", + "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.1/MODULE.bazel": "5e463fbfba7b1701d957555ed45097d7f984211330106ccd1352c6e0af0dcf91", + "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.2/MODULE.bazel": "75aab2373a4bbe2a1260b9bf2a1ebbdbf872d3bd36f80bff058dccd82e89422f", + "https://bcr.bazel.build/modules/swift_argument_parser/1.3.1.2/source.json": "5fba48bbe0ba48761f9e9f75f92876cafb5d07c0ce059cc7a8027416de94a05b", + "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/MODULE.bazel": "7298990c00040a0e2f121f6c32544bab27d4452f80d9ce51349b1a28f3005c43", + "https://bcr.bazel.build/modules/zlib/1.2.11/MODULE.bazel": "07b389abc85fdbca459b69e2ec656ae5622873af3f845e1c9d80fe179f3effa0", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/MODULE.bazel": "eec517b5bbe5492629466e11dae908d043364302283de25581e3eb944326c4ca", + "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/source.json": "22bc55c47af97246cfc093d0acf683a7869377de362b5d1c552c2c2e16b7a806", + "https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198" + }, + "selectedYankedVersions": {}, + "moduleExtensions": { + "@@rules_kotlin+//src/main/starlark/core/repositories:bzlmod_setup.bzl%rules_kotlin_extensions": { + "general": { + "bzlTransitiveDigest": "WDuVCwqV73DvcHB5Of+02lhUZgPxr9MqtpvMRyUi0eQ=", + "usagesDigest": "QI2z8ZUR+mqtbwsf2fLqYdJAkPOHdOV+tF2yVAUgRzw=", + "recordedInputs": [ + "REPO_MAPPING:rules_kotlin+,bazel_tools bazel_tools" + ], + "generatedRepoSpecs": { + "com_github_jetbrains_kotlin_git": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_compiler_git_repository", + "attributes": { + "urls": [ + "https://github.com/JetBrains/kotlin/releases/download/v1.9.23/kotlin-compiler-1.9.23.zip" + ], + "sha256": "93137d3aab9afa9b27cb06a824c2324195c6b6f6179d8a8653f440f5bd58be88" + } + }, + "com_github_jetbrains_kotlin": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:compiler.bzl%kotlin_capabilities_repository", + "attributes": { + "git_repository_name": "com_github_jetbrains_kotlin_git", + "compiler_version": "1.9.23" + } + }, + "com_github_google_ksp": { + "repoRuleId": "@@rules_kotlin+//src/main/starlark/core/repositories:ksp.bzl%ksp_compiler_plugin_repository", + "attributes": { + "urls": [ + "https://github.com/google/ksp/releases/download/1.9.23-1.0.20/artifacts.zip" + ], + "sha256": "ee0618755913ef7fd6511288a232e8fad24838b9af6ea73972a76e81053c8c2d", + "strip_version": "1.9.23-1.0.20" + } + }, + "com_github_pinterest_ktlint": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_file", + "attributes": { + "sha256": "01b2e0ef893383a50dbeb13970fe7fa3be36ca3e83259e01649945b09d736985", + "urls": [ + "https://github.com/pinterest/ktlint/releases/download/1.3.0/ktlint" + ], + "executable": true + } + }, + "rules_android": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "sha256": "cd06d15dd8bb59926e4d65f9003bfc20f9da4b2519985c27e190cddc8b7a7806", + "strip_prefix": "rules_android-0.1.1", + "urls": [ + "https://github.com/bazelbuild/rules_android/archive/v0.1.1.zip" + ] + } + } + } + } + }, + "@@rules_python+//python/extensions:config.bzl%config": { + "general": { + "bzlTransitiveDigest": "L+2ZCpb7GIJqvWaXpzkfk/80d916sIFVmSPzrSm6of8=", + "usagesDigest": "ZVSXMAGpD+xzVNPuvF1IoLBkty7TROO0+akMapt1pAg=", + "recordedInputs": [ + "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_python+,pypi__build rules_python++config+pypi__build", + "REPO_MAPPING:rules_python+,pypi__click rules_python++config+pypi__click", + "REPO_MAPPING:rules_python+,pypi__colorama rules_python++config+pypi__colorama", + "REPO_MAPPING:rules_python+,pypi__importlib_metadata rules_python++config+pypi__importlib_metadata", + "REPO_MAPPING:rules_python+,pypi__installer rules_python++config+pypi__installer", + "REPO_MAPPING:rules_python+,pypi__more_itertools rules_python++config+pypi__more_itertools", + "REPO_MAPPING:rules_python+,pypi__packaging rules_python++config+pypi__packaging", + "REPO_MAPPING:rules_python+,pypi__pep517 rules_python++config+pypi__pep517", + "REPO_MAPPING:rules_python+,pypi__pip rules_python++config+pypi__pip", + "REPO_MAPPING:rules_python+,pypi__pip_tools rules_python++config+pypi__pip_tools", + "REPO_MAPPING:rules_python+,pypi__pyproject_hooks rules_python++config+pypi__pyproject_hooks", + "REPO_MAPPING:rules_python+,pypi__setuptools rules_python++config+pypi__setuptools", + "REPO_MAPPING:rules_python+,pypi__tomli rules_python++config+pypi__tomli", + "REPO_MAPPING:rules_python+,pypi__wheel rules_python++config+pypi__wheel", + "REPO_MAPPING:rules_python+,pypi__zipp rules_python++config+pypi__zipp" + ], + "generatedRepoSpecs": { + "rules_python_internal": { + "repoRuleId": "@@rules_python+//python/private:internal_config_repo.bzl%internal_config_repo", + "attributes": { + "transition_setting_generators": {}, + "transition_settings": [] + } + }, + "pypi__build": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/e2/03/f3c8ba0a6b6e30d7d18c40faab90807c9bb5e9a1e3b2fe2008af624a9c97/build-1.2.1-py3-none-any.whl", + "sha256": "75e10f767a433d9a86e50d83f418e83efc18ede923ee5ff7df93b6cb0306c5d4", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__click": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl", + "sha256": "ae74fb96c20a0277a1d615f1e4d73c8414f5a98db8b799a7931d1582f3390c28", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__colorama": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", + "sha256": "4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__importlib_metadata": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/2d/0a/679461c511447ffaf176567d5c496d1de27cbe34a87df6677d7171b2fbd4/importlib_metadata-7.1.0-py3-none-any.whl", + "sha256": "30962b96c0c223483ed6cc7280e7f0199feb01a0e40cfae4d4450fc6fab1f570", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__installer": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/e5/ca/1172b6638d52f2d6caa2dd262ec4c811ba59eee96d54a7701930726bce18/installer-0.7.0-py3-none-any.whl", + "sha256": "05d1933f0a5ba7d8d6296bb6d5018e7c94fa473ceb10cf198a92ccea19c27b53", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__more_itertools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/50/e2/8e10e465ee3987bb7c9ab69efb91d867d93959095f4807db102d07995d94/more_itertools-10.2.0-py3-none-any.whl", + "sha256": "686b06abe565edfab151cb8fd385a05651e1fdf8f0a14191e4439283421f8684", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__packaging": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/49/df/1fceb2f8900f8639e278b056416d49134fb8d84c5942ffaa01ad34782422/packaging-24.0-py3-none-any.whl", + "sha256": "2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pep517": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/25/6e/ca4a5434eb0e502210f591b97537d322546e4833dcb4d470a48c375c5540/pep517-0.13.1-py3-none-any.whl", + "sha256": "31b206f67165b3536dd577c5c3f1518e8fbaf38cbc57efff8369a392feff1721", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pip": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl", + "sha256": "ba0d021a166865d2265246961bec0152ff124de910c5cc39f1156ce3fa7c69dc", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pip_tools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/0d/dc/38f4ce065e92c66f058ea7a368a9c5de4e702272b479c0992059f7693941/pip_tools-7.4.1-py3-none-any.whl", + "sha256": "4c690e5fbae2f21e87843e89c26191f0d9454f362d8acdbd695716493ec8b3a9", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__pyproject_hooks": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/ae/f3/431b9d5fe7d14af7a32340792ef43b8a714e7726f1d7b69cc4e8e7a3f1d7/pyproject_hooks-1.1.0-py3-none-any.whl", + "sha256": "7ceeefe9aec63a1064c18d939bdc3adf2d8aa1988a510afec15151578b232aa2", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__setuptools": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/90/99/158ad0609729111163fc1f674a5a42f2605371a4cf036d0441070e2f7455/setuptools-78.1.1-py3-none-any.whl", + "sha256": "c3a9c4211ff4c309edb8b8c4f1cbfa7ae324c4ba9f91ff254e3d305b9fd54561", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__tomli": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/97/75/10a9ebee3fd790d20926a90a2547f0bf78f371b2f13aa822c759680ca7b9/tomli-2.0.1-py3-none-any.whl", + "sha256": "939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__wheel": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/7d/cd/d7460c9a869b16c3dd4e1e403cce337df165368c71d6af229a74699622ce/wheel-0.43.0-py3-none-any.whl", + "sha256": "55c570405f142630c6b9f72fe09d9b67cf1477fcf543ae5b8dcb1f5b7377da81", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + }, + "pypi__zipp": { + "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", + "attributes": { + "url": "https://files.pythonhosted.org/packages/da/55/a03fd7240714916507e1fcf7ae355bd9d9ed2e6db492595f1a67f61681be/zipp-3.18.2-py3-none-any.whl", + "sha256": "dce197b859eb796242b0622af1b8beb0a722d52aa2f57133ead08edd5bf5374e", + "type": "zip", + "build_file_content": "package(default_visibility = [\"//visibility:public\"])\n\nload(\"@rules_python//python:py_library.bzl\", \"py_library\")\n\npy_library(\n name = \"lib\",\n srcs = glob([\"**/*.py\"]),\n data = glob([\"**/*\"], exclude=[\n # These entries include those put into user-installed dependencies by\n # data_exclude to avoid non-determinism.\n \"**/*.py\",\n \"**/*.pyc\",\n \"**/*.pyc.*\", # During pyc creation, temp files named *.pyc.NNN are created\n \"**/*.dist-info/RECORD\",\n \"BUILD\",\n \"WORKSPACE\",\n ]),\n # This makes this directory a top-level in the python import\n # search path for anything that depends on this.\n imports = [\".\"],\n)\n" + } + } + } + } + }, + "@@rules_python+//python/uv:uv.bzl%uv": { + "general": { + "bzlTransitiveDigest": "IgkgxNrtlAec7OnaFrWoCC5NQhHcY/aIz4jsqcNMm8Y=", + "usagesDigest": "H8dQoNZcoqP+Mu0tHZTi4KHATzvNkM5ePuEqoQdklIU=", + "recordedInputs": [ + "REPO_MAPPING:rules_python+,bazel_tools bazel_tools", + "REPO_MAPPING:rules_python+,platforms platforms" + ], + "generatedRepoSpecs": { + "uv": { + "repoRuleId": "@@rules_python+//python/uv/private:uv_toolchains_repo.bzl%uv_toolchains_repo", + "attributes": { + "toolchain_type": "'@@rules_python+//python/uv:uv_toolchain_type'", + "toolchain_names": [ + "none" + ], + "toolchain_implementations": { + "none": "'@@rules_python+//python:none'" + }, + "toolchain_compatible_with": { + "none": [ + "@platforms//:incompatible" + ] + }, + "toolchain_target_settings": {} + } + } + } + } + } + }, + "facts": {}, + "factsVersions": {} +} diff --git a/tests/rust/data/collection/file1.txt b/tests/rust/data/collection/file1.txt new file mode 100644 index 0000000..0c10a1b --- /dev/null +++ b/tests/rust/data/collection/file1.txt @@ -0,0 +1 @@ +content of file 1 diff --git a/tests/rust/data/collection/file2.txt b/tests/rust/data/collection/file2.txt new file mode 100644 index 0000000..96c4e50 --- /dev/null +++ b/tests/rust/data/collection/file2.txt @@ -0,0 +1 @@ +content of file 2 diff --git a/tests/rust/data/dummy.txt b/tests/rust/data/dummy.txt new file mode 100644 index 0000000..eaf5f75 --- /dev/null +++ b/tests/rust/data/dummy.txt @@ -0,0 +1 @@ +dummy content diff --git a/tests/rust/data/helper_data.txt b/tests/rust/data/helper_data.txt new file mode 100644 index 0000000..c384a07 --- /dev/null +++ b/tests/rust/data/helper_data.txt @@ -0,0 +1 @@ +helper data content diff --git a/tests/rust/format_test.rs b/tests/rust/format_test.rs new file mode 100644 index 0000000..1268441 --- /dev/null +++ b/tests/rust/format_test.rs @@ -0,0 +1,23 @@ +//! Checks that the source generated for `:test_resources` is formatted as +//! `rustfmt` would format it. + +use format_check_resources::{GENERATED_SOURCE, RUSTFMT}; + +#[test] +fn generated_source_is_rustfmt_clean() { + let source = GENERATED_SOURCE.must_resolve(); + let output = RUSTFMT + .must_resolve() + .command() + .args(["--check", "--edition", "2021"]) + .arg(source.path()) + .output() + .expect("cannot run rustfmt"); + assert!( + output.status.success(), + "rustfmt --check failed with {}\nstdout:\n{}\nstderr:\n{}", + output.status, + String::from_utf8_lossy(&output.stdout), + String::from_utf8_lossy(&output.stderr) + ); +} diff --git a/tests/rust/helper_bin.rs b/tests/rust/helper_bin.rs new file mode 100644 index 0000000..0f2f8b8 --- /dev/null +++ b/tests/rust/helper_bin.rs @@ -0,0 +1,30 @@ +//! Prints `data/helper_data.txt`, found through its own runfiles. +//! +//! The integration test runs this binary as a child process to check that +//! `Executable::command()` passes the runfiles environment on. + +use std::process::ExitCode; + +fn main() -> ExitCode { + let runfiles = match runfiles::Runfiles::create() { + Ok(runfiles) => runfiles, + Err(err) => { + eprintln!("helper: cannot find runfiles: {err}"); + return ExitCode::FAILURE; + } + }; + let Some(path) = runfiles::rlocation!(runfiles, "_main/data/helper_data.txt") else { + eprintln!("helper: data/helper_data.txt is not in the runfiles"); + return ExitCode::FAILURE; + }; + match std::fs::read_to_string(&path) { + Ok(content) => { + print!("{content}"); + ExitCode::SUCCESS + } + Err(err) => { + eprintln!("helper: cannot read {}: {err}", path.display()); + ExitCode::FAILURE + } + } +} diff --git a/tests/rust/integration_test.rs b/tests/rust/integration_test.rs new file mode 100644 index 0000000..6300e2e --- /dev/null +++ b/tests/rust/integration_test.rs @@ -0,0 +1,329 @@ +//! Integration tests for the crate generated by `rust_runfile_library`. +//! +//! `bazel test` runs these in the test sandbox. `manifest_only` re-runs the +//! `manifest_only_child` test in a child process that can find its runfiles +//! only through `RUNFILES_MANIFEST_FILE`. + +use std::path::{Path, PathBuf}; +use std::process::Command; + +use runfile::{Error, FileSet}; +use test_resources as res; + +fn read(path: impl AsRef) -> String { + let path = path.as_ref(); + std::fs::read_to_string(path) + .unwrap_or_else(|err| panic!("cannot read {}: {err}", path.display())) + .trim() + .to_owned() +} + +fn rel_paths(set: &FileSet) -> Vec<&'static str> { + set.rel_paths().collect() +} + +/// Runs `command` and returns its trimmed stdout, failing on a non-zero exit. +fn run(mut command: Command) -> String { + let output = command.output().expect("cannot start child process"); + assert!( + output.status.success(), + "child failed with {}\nstderr:\n{}", + output.status, + String::from_utf8_lossy(&output.stderr) + ); + String::from_utf8(output.stdout).unwrap().trim().to_owned() +} + +#[test] +fn single_file() { + let file = res::SINGLE_FILE.resolve().unwrap(); + assert_eq!(read(file.path()), "dummy content"); + assert_eq!(file.rlocation_path(), "_main/data/dummy.txt"); + assert_eq!(res::SINGLE_FILE.rlocation_path(), "_main/data/dummy.txt"); + assert!(file.path().is_absolute(), "{}", file.path().display()); +} + +#[test] +fn executable_command_propagates_runfiles_env() { + for spec in [res::EXECUTABLE_FILE, res::EXPLICIT_EXECUTABLE] { + let helper = spec.resolve().unwrap(); + let command = helper.command(); + let keys: Vec<_> = command + .get_envs() + .map(|(k, _)| k.to_string_lossy().into_owned()) + .collect(); + assert!( + keys.iter() + .any(|k| k == "RUNFILES_DIR" || k == "RUNFILES_MANIFEST_FILE"), + "command sets no runfiles variable: {keys:?}" + ); + assert_eq!(run(command), "helper data content"); + } +} + +#[test] +fn executable_without_runfiles_env_fails() { + // The helper is not self-contained: without the propagated variables it + // has no way to find data/helper_data.txt. This shows that the previous + // test depends on `command()` setting them. + // Run a copy outside the runfiles tree, so that the helper cannot find + // `.runfiles` next to itself either. + let helper = res::EXECUTABLE_FILE.must_resolve(); + let copy = PathBuf::from(std::env::var_os("TEST_TMPDIR").unwrap()).join("helper_copy"); + std::fs::copy(helper.path(), ©).unwrap(); + let mut command = Command::new(©); + for key in [ + "RUNFILES_DIR", + "RUNFILES_MANIFEST_FILE", + "JAVA_RUNFILES", + "TEST_SRCDIR", + ] { + command.env_remove(key); + } + let output = command.output().unwrap(); + assert!(!output.status.success(), "helper unexpectedly succeeded"); +} + +#[test] +fn external_file() { + let file = res::EXTERNAL_FILE.resolve().unwrap(); + assert!(read(file.path()).contains("name = \"rules_rust\"")); + assert!( + file.rlocation_path().starts_with("rules_rust"), + "{}", + file.rlocation_path() + ); +} + +#[test] +fn group_data() { + let set = res::GROUP_DATA.resolve().unwrap(); + assert_eq!(rel_paths(&set), ["file1.txt", "file2.txt"]); + assert_eq!(read(set.file("file1.txt").unwrap()), "content of file 1"); + assert_eq!(read(set.must_file("file2.txt")), "content of file 2"); + assert!(matches!( + set.file("non-existent.txt"), + Err(Error::NotInFileSet { .. }) + )); +} + +#[test] +fn group_data_default_base() { + let set = res::GROUP_DATA_DEFAULT.resolve().unwrap(); + assert_eq!( + rel_paths(&set), + ["data/collection/file1.txt", "data/collection/file2.txt"] + ); + assert_eq!( + read(set.file("data/collection/file1.txt").unwrap()), + "content of file 1" + ); +} + +#[test] +fn directory() { + for spec in [res::DIR_DATA, res::WRAPPED_DIR, res::STRICT_DIR] { + let dir = spec.resolve().unwrap(); + assert!(dir.path().is_dir(), "{}", dir.path().display()); + assert_eq!(read(dir.child("file1.txt")), "file1 content"); + assert_eq!(read(dir.child("file2.txt")), "file2 content"); + } +} + +#[test] +fn mixed_group() { + let set = res::MIXED_GROUP.resolve().unwrap(); + assert_eq!(rel_paths(&set), ["data/dummy.txt", "dir_data"]); + let dir = set.file("dir_data").unwrap().path(); + assert!(dir.is_dir(), "{}", dir.display()); + assert_eq!(read(dir.join("file1.txt")), "file1 content"); +} + +#[test] +fn generated_file() { + assert_eq!(read(res::GEN_DATA.must_resolve()), "generated"); +} + +#[test] +fn distant_group() { + // The default base is the library's package, so the external file is + // left out. + let set = res::DISTANT_GROUP.resolve().unwrap(); + assert_eq!(rel_paths(&set), ["data/dummy.txt"]); + assert_eq!(read(set.file("data/dummy.txt").unwrap()), "dummy content"); + + let filtered = res::DISTANT_GROUP_FILTERED.resolve().unwrap(); + assert_eq!(rel_paths(&filtered), ["dummy.txt"]); + + let unfiltered = res::DISTANT_GROUP_UNFILTERED.resolve().unwrap(); + assert_eq!( + rel_paths(&unfiltered), + ["_main/data/dummy.txt", "rules_rust+/MODULE.bazel"] + ); + assert!(read(unfiltered.file("rules_rust+/MODULE.bazel").unwrap()).contains("rules_rust")); +} + +#[test] +fn mock_repo_group() { + let set = res::MOCK_REPO_GROUP.resolve().unwrap(); + assert_eq!(rel_paths(&set), ["file1.txt", "file2.txt"]); + assert_eq!(read(set.file("file1.txt").unwrap()), "mock file 1"); + assert_eq!(read(set.file("file2.txt").unwrap()), "mock file 2"); +} + +#[test] +fn sub_groups() { + for spec in [ + res::SUB_GROUP_PACKAGE_RELATIVE, + res::SUB_GROUP_REPO_RELATIVE, + ] { + let set = spec.resolve().unwrap(); + assert_eq!(rel_paths(&set), ["file1.txt", "file2.txt"]); + assert_eq!(read(set.file("file1.txt").unwrap()), "sub file 1"); + } +} + +#[test] +fn explicit_types() { + assert_eq!(read(res::STRICT_FILE.must_resolve()), "dummy content"); + + let strict = res::STRICT_FILE_SET.resolve().unwrap(); + assert_eq!(rel_paths(&strict), ["file1.txt", "file2.txt"]); + + let forced = res::FORCED_FILE_SET.resolve().unwrap(); + assert_eq!(rel_paths(&forced), ["data/dummy.txt"]); + assert_eq!( + read(forced.file("data/dummy.txt").unwrap()), + "dummy content" + ); +} + +#[test] +fn common_dir_file_set() { + let set = res::COMMON_DIR_FILE_SET.resolve().unwrap(); + assert_eq!(rel_paths(&set), ["file1.txt", "file2.txt"]); + assert_eq!(read(set.file("file1.txt").unwrap()), "content of file 1"); +} + +#[test] +fn duplicate_targets() { + let stripped = res::DUPLICATE_TARGET1.resolve().unwrap(); + assert_eq!(rel_paths(&stripped), ["file1.txt", "file2.txt"]); + + let full = res::DUPLICATE_TARGET2.resolve().unwrap(); + assert_eq!( + rel_paths(&full), + [ + "_main/data/collection/file1.txt", + "_main/data/collection/file2.txt" + ] + ); +} + +#[test] +fn mixed_file_set() { + let set = res::MIXED_FILE_SET.resolve().unwrap(); + assert_eq!( + rel_paths(&set), + [ + "data/collection/file1.txt", + "data/collection/file2.txt", + "subdir/sub_data/file1.txt", + "subdir/sub_data/file2.txt", + ] + ); + assert_eq!( + read(set.file("data/collection/file1.txt").unwrap()), + "content of file 1" + ); + assert_eq!( + read(set.file("subdir/sub_data/file1.txt").unwrap()), + "sub file 1" + ); +} + +/// Set in the child process started by `manifest_only`. +const MANIFEST_ONLY_CHILD: &str = "RUNFILE_TEST_MANIFEST_ONLY_CHILD"; + +#[test] +fn manifest_only() { + let runfiles_dir = std::env::var_os("RUNFILES_DIR") + .or_else(|| std::env::var_os("TEST_SRCDIR")) + .map(PathBuf::from) + .expect("bazel test sets RUNFILES_DIR or TEST_SRCDIR"); + let manifest = find_manifest(&runfiles_dir); + + let mut command = Command::new(std::env::current_exe().unwrap()); + command + .args(["--exact", "manifest_only_child", "--ignored", "--nocapture"]) + .env(MANIFEST_ONLY_CHILD, "1") + .env("RUNFILES_MANIFEST_FILE", &manifest) + .env_remove("RUNFILES_DIR") + .env_remove("JAVA_RUNFILES") + .env_remove("TEST_SRCDIR"); + let output = run(command); + assert!(output.contains("1 passed"), "{output}"); +} + +/// Returns the runfiles manifest Bazel wrote for this test. +/// +/// The test sandbox does not always contain it (Bazel 9 leaves it out), but +/// it is next to the test binary in the output tree. +fn find_manifest(runfiles_dir: &Path) -> PathBuf { + let next_to_binary = std::env::current_exe().ok().map(|exe| { + let mut name = exe.file_name().unwrap().to_owned(); + name.push(".runfiles_manifest"); + exe.with_file_name(name) + }); + let candidates = [ + std::env::var_os("RUNFILES_MANIFEST_FILE") + .filter(|v| !v.is_empty()) + .map(PathBuf::from), + Some(runfiles_dir.join("MANIFEST")), + Some(runfiles_dir.with_extension("runfiles_manifest")), + next_to_binary, + ]; + let candidates: Vec = candidates.into_iter().flatten().collect(); + candidates + .iter() + .find(|m| m.is_file()) + .unwrap_or_else(|| panic!("no runfiles manifest at any of {candidates:?}")) + .clone() +} + +/// Resolves runfiles with only `RUNFILES_MANIFEST_FILE` set. Run by +/// `manifest_only`; ignored otherwise. +#[test] +#[ignore = "run by manifest_only"] +fn manifest_only_child() { + assert!( + std::env::var_os(MANIFEST_ONLY_CHILD).is_some(), + "run this through manifest_only" + ); + assert!(std::env::var_os("RUNFILES_DIR").is_none()); + + // Manifest entries point at the files themselves, not into the + // runfiles tree. + let file = res::SINGLE_FILE.resolve().unwrap(); + assert_eq!(read(file.path()), "dummy content"); + assert!( + !file.path().to_string_lossy().contains(".runfiles/"), + "resolved through the runfiles tree: {}", + file.path().display() + ); + + let set = res::MOCK_REPO_GROUP.resolve().unwrap(); + assert_eq!(read(set.file("file2.txt").unwrap()), "mock file 2"); + + let dir = res::DIR_DATA.resolve().unwrap(); + assert_eq!(read(dir.child("file1.txt")), "file1 content"); + + // The child of this child also gets only the manifest. + let command = res::EXECUTABLE_FILE.must_resolve().command(); + let env: Vec<_> = command + .get_envs() + .map(|(k, _)| k.to_string_lossy().into_owned()) + .collect(); + assert_eq!(env, ["RUNFILES_MANIFEST_FILE"]); + assert_eq!(run(command), "helper data content"); +} diff --git a/tests/rust/mock_repo/BUILD.bazel b/tests/rust/mock_repo/BUILD.bazel new file mode 100644 index 0000000..8d6216f --- /dev/null +++ b/tests/rust/mock_repo/BUILD.bazel @@ -0,0 +1,8 @@ +filegroup( + name = "files", + srcs = [ + "data/file1.txt", + "data/file2.txt", + ], + visibility = ["//visibility:public"], +) diff --git a/tests/rust/mock_repo/MODULE.bazel b/tests/rust/mock_repo/MODULE.bazel new file mode 100644 index 0000000..b535f67 --- /dev/null +++ b/tests/rust/mock_repo/MODULE.bazel @@ -0,0 +1,4 @@ +module( + name = "mock_repo", + version = "0.0.0", +) diff --git a/tests/rust/mock_repo/data/file1.txt b/tests/rust/mock_repo/data/file1.txt new file mode 100644 index 0000000..439039f --- /dev/null +++ b/tests/rust/mock_repo/data/file1.txt @@ -0,0 +1 @@ +mock file 1 diff --git a/tests/rust/mock_repo/data/file2.txt b/tests/rust/mock_repo/data/file2.txt new file mode 100644 index 0000000..02b808e --- /dev/null +++ b/tests/rust/mock_repo/data/file2.txt @@ -0,0 +1 @@ +mock file 2 diff --git a/tests/rust/rules.bzl b/tests/rust/rules.bzl new file mode 100644 index 0000000..9d20688 --- /dev/null +++ b/tests/rust/rules.bzl @@ -0,0 +1,11 @@ +def _dir_producer_impl(ctx): + out_dir = ctx.actions.declare_directory(ctx.label.name) + ctx.actions.run_shell( + outputs = [out_dir], + command = "mkdir -p {dir} && echo 'file1 content' > {dir}/file1.txt && echo 'file2 content' > {dir}/file2.txt".format(dir = out_dir.path), + ) + return [DefaultInfo(files = depset([out_dir]))] + +dir_producer = rule( + implementation = _dir_producer_impl, +) diff --git a/tests/rust/subdir/BUILD.bazel b/tests/rust/subdir/BUILD.bazel new file mode 100644 index 0000000..6aea78b --- /dev/null +++ b/tests/rust/subdir/BUILD.bazel @@ -0,0 +1,19 @@ +filegroup( + name = "sub_collection1", + srcs = [ + "sub_data/file1.txt", + "sub_data/file2.txt", + ], + visibility = ["//visibility:public"], +) + +filegroup( + name = "sub_collection2", + srcs = [ + "sub_data/file1.txt", + "sub_data/file2.txt", + ], + visibility = ["//visibility:public"], +) + + diff --git a/tests/rust/subdir/sub_data/file1.txt b/tests/rust/subdir/sub_data/file1.txt new file mode 100644 index 0000000..f498c6c --- /dev/null +++ b/tests/rust/subdir/sub_data/file1.txt @@ -0,0 +1 @@ +sub file 1 diff --git a/tests/rust/subdir/sub_data/file2.txt b/tests/rust/subdir/sub_data/file2.txt new file mode 100644 index 0000000..37da742 --- /dev/null +++ b/tests/rust/subdir/sub_data/file2.txt @@ -0,0 +1 @@ +sub file 2 diff --git a/tools/cmd/devtool/bcr_validation_test.go b/tools/cmd/devtool/bcr_validation_test.go index f516c8b..ef7bb5b 100644 --- a/tools/cmd/devtool/bcr_validation_test.go +++ b/tools/cmd/devtool/bcr_validation_test.go @@ -14,7 +14,7 @@ func TestValidateBCRFiles(t *testing.T) { t.Fatalf("failed to detect repo root: %v", err) } - modules := []string{"core", "go", "kotlin"} + modules := []string{"core", "go", "kotlin", "rust"} for _, mod := range modules { t.Run(mod+"/presubmit", func(t *testing.T) { diff --git a/tools/cmd/devtool/languages.go b/tools/cmd/devtool/languages.go index 2830565..b40f726 100644 --- a/tools/cmd/devtool/languages.go +++ b/tools/cmd/devtool/languages.go @@ -2,7 +2,7 @@ package main // LanguageConfig defines the paths and markers for a language module's examples. type LanguageConfig struct { - ID string // "go", "kotlin" (used in paths: examples//) + ID string // "go", "kotlin", "rust" (used in paths: examples//) LangMarker string // "GO", "KOTLIN" (used in README markers: ) Extension string // "go", "kotlin" (used for markdown code block syntax highlighting) UsageFile string // "main.go", "Main.kt" (relative to examples//) @@ -40,4 +40,11 @@ var languages = []LanguageConfig{ UsageFile: "Main.kt", GenFile: "bazel-bin/resources_codegen_gen.kt", }, + { + ID: "rust", + LangMarker: "RUST", + Extension: "rust", + UsageFile: "main.rs", + GenFile: "bazel-bin/resources_codegen_gen.rs", + }, } diff --git a/tools/cmd/devtool/test.go b/tools/cmd/devtool/test.go index 6c86403..d11b849 100644 --- a/tools/cmd/devtool/test.go +++ b/tools/cmd/devtool/test.go @@ -31,10 +31,13 @@ var targets = []testTarget{ {"core", "//internal/..."}, {"go", "//..."}, {"kotlin", "//..."}, + {"rust", "//..."}, {"tests/go", "//..."}, {"tests/kotlin", "//..."}, + {"tests/rust", "//..."}, {"examples/go", "//..."}, {"examples/kotlin", "//..."}, + {"examples/rust", "//..."}, } func runTests() error { diff --git a/tools/cmd/devtool/version.go b/tools/cmd/devtool/version.go index 202e420..7c07a0a 100644 --- a/tools/cmd/devtool/version.go +++ b/tools/cmd/devtool/version.go @@ -21,7 +21,7 @@ var versionCmd = &cobra.Command{ var versionCheckCmd = &cobra.Command{ Use: "check", - Short: "Verify that core, go, and kotlin modules have the same version", + Short: "Verify that core and all language modules have the same version", RunE: func(cmd *cobra.Command, args []string) error { return runVersionCheck() }, @@ -29,7 +29,7 @@ var versionCheckCmd = &cobra.Command{ var versionSetCmd = &cobra.Command{ Use: "set [version]", - Short: "Set the version in core, go, and kotlin MODULE.bazel files", + Short: "Set the version in the MODULE.bazel files of core and all language modules", Args: cobra.ExactArgs(1), RunE: func(cmd *cobra.Command, args []string) error { return runVersionSet(args[0]) @@ -92,7 +92,7 @@ func runVersionCheck() error { return fmt.Errorf("version mismatch detected") } - fmt.Println("Core, go, and kotlin module versions and dependencies are consistent.") + fmt.Println("Core and language module versions and dependencies are consistent.") return nil } @@ -103,7 +103,7 @@ func runVersionSet(newVersion string) error { modules = append(modules, lang.ID) } - fmt.Printf("Setting version to %s in core, go, and kotlin modules...\n", newVersion) + fmt.Printf("Setting version to %s in core and language modules...\n", newVersion) for _, mod := range modules { path := filepath.Join(resolvedRoot, mod, "MODULE.bazel") @@ -112,6 +112,6 @@ func runVersionSet(newVersion string) error { } } - fmt.Println("Successfully updated core, go, and kotlin module versions.") + fmt.Println("Successfully updated core and language module versions.") return nil } From dba1c3a4ade4de2085ec987a3723b2a974a79184 Mon Sep 17 00:00:00 2001 From: Red Daly Date: Fri, 6 Nov 2026 12:59:05 -0800 Subject: [PATCH 2/3] chore(engprod): allow the rust scope in pull request titles Co-Authored-By: Claude Opus 5.5 --- .github/workflows/semantic-pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/semantic-pr.yml b/.github/workflows/semantic-pr.yml index 7a1948f..c3e5670 100644 --- a/.github/workflows/semantic-pr.yml +++ b/.github/workflows/semantic-pr.yml @@ -25,5 +25,6 @@ jobs: core go kotlin + rust engprod requireScope: false From a82f48e92c9c04a6cbfd58a5cf95a3d62209c490 Mon Sep 17 00:00:00 2001 From: Red Daly Date: Fri, 6 Nov 2026 13:01:10 -0800 Subject: [PATCH 3/3] docs(rust): add the blank line that lets the generated code render Without a blank line after , GitHub treats the code fence as HTML text. The Go and Kotlin sections already have it. Co-Authored-By: Claude Opus 5.5 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 728e5ed..0afcea4 100644 --- a/README.md +++ b/README.md @@ -458,6 +458,7 @@ The `runfile` crate reads the file system, so it does not build for `wasm32-unkn
Click to view the actual generated Rust code for the example above + ```rust // Code generated by rules_runfile_codegen. DO NOT EDIT.