tomato·bazeldocs v0 · latest
Docs/Reference/Modules/rules_fastverk_plugin

rules_fastverk_plugin

The portable fastverk console-plugin build macro (fastverk_plugin + rust_service_image).

MODULE.bazelstarlark
bazel_dep(name = "rules_fastverk_plugin", version = "0.0.1")

View source & releases on GitHub ↗

The portable Bazel macro for building a fastverk console plugin backend.

fastverk_plugin (in //plugin:defs.bzl) emits a plugin’s full target set from one call — a rust_library + rust_binary + rust_test, an optional proto cargo_build_script, and an OCI service image — the same shape botnoc’s services/* plugins use, but callable from any standalone module.

Why this module exists

The macro was botnoc-internal and not portable: it loaded botnoc’s @crates universe and hardcoded //crates/fastverk-plugin-server / //crates/fastverk-layout labels (bare labels resolve in the caller’s repo), and those two runtime crates can’t be shared as Bazel rust_library labels across an isolated crate_universe boundary without duplicate tonic/tokio symbols.

The fix: the macro takes the caller’s crate deps as arguments (deps / build_deps = the caller’s own all_crate_deps), and the shared HTTP facade (fastverk-plugin-server) is consumed as a cargo dep in the caller’s Cargo.toml — so it resolves in the caller’s single crate universe.

Usage

# MODULE.bazel
bazel_dep(name = "rules_fastverk_plugin", version = "0.0.1")

# services/<name>/BUILD.bazel
load("@rules_fastverk_plugin//plugin:defs.bzl", "fastverk_plugin")
load("@crates//:defs.bzl", "all_crate_deps")

fastverk_plugin(
    name = "spec",
    deps = all_crate_deps(normal = True),   # must include the fastverk-plugin-server cargo dep
    build_deps = all_crate_deps(build = True),
    proto_data = ["//proto/spec/v1:spec.proto"],
    panels = "//services/spec/ui:panels",
    exposed_ports = ["8080/tcp"],
    image_repository = "ghcr.io/fastverk/spec-server",   # required
)

botnoc’s //tools/plugin:defs.bzl is a thin shim over this macro (crate_prefix = "botnoc") so its six existing plugins build unchanged.

Also exports rust_service_image (//oci:defs.bzl) + a distroless/cc base (//oci:base_image).

Conformance#

No gate findings. 15 contested atoms. See how gating works or the full report.

Contested atoms

Third-party modules where this module resolves a different version than others do. Not a violation of anything this module did — it is the actionable form of a registry-level convergence finding, and the sentence a maintainer can act on.

AtomResolved hereElsewhere
apple_support 1.24.2 2.2.0 ×1
aspect_bazel_lib 2.22.5 2.8.1 ×1
bazel_lib 3.0.0 3.2.2 ×17
bazel_skylib 1.8.2 1.9.0 ×2
gawk 5.3.2.bcr.1 5.3.2.bcr.3 ×17
jq.bzl 0.1.0 0.4.0 ×17
nlohmann_json 3.6.1 3.12.0.bcr.1 ×1
package_metadata 0.0.2 0.0.5 ×3
protobuf 33.4 34.0.bcr.1 ×2
rules_jvm_external 6.7 6.8 ×4
rules_python 1.7.0 2.0.1 ×1
rules_swift 3.1.2 3.6.1 ×1
tar.bzl 0.5.1 0.10.4 ×170.6.0 ×1
upb 0.0.0-20220923-a547704 0.0.0-20230516-61a97ef ×1
yq.bzl 0.1.1 0.3.4 ×17

Dependencies#

rules_fastverk_plugin in the registry graph — what it depends on (left) and what depends on it (right).

Depends on

rules_rust0.70.0protobuf33.4rules_oci2.2.6rules_pkg1.0.1aspect_bazel_lib2.22.5

Used by (1 in the registry)

Versions#

1 published version, newest first. Each resolves to an immutable, integrity-checked archive.

VersionIntegrity (sha256)Source archive
0.0.1 latest lWI/NfhhCSUDHAZM… tag archive ↗

← All modules