Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
switchback-protobuf
[!WARNING] Early prototype while exploring design and aiming for equivalence with protobuf-mdbook, while expanding scope through traits and intermediary on-disk representation.
This is not ready for adoption, nor even stable at a
v1alpha1yet. You'll want to keep eyes on the repository for development.A lot of this is clanker driven, so vetting a good human read through pass hasn't been completed yet.
Protobuf parser for the switchback-rs toolchain.
switchback-protobuf turns .proto inputs into a
ReferenceManual
using a compile-to-descriptors pipeline (protoc or buf build), then
populates switchback groups, entities, companions, and the source layer. The
design is decomposed from
protobuf-mdbook; this crate
is library-only (no mdBook renderer or working CLI in this pass).
Usage
use PathBuf;
use ;
let module_root = fixtures_proto_dir;
let export = default_proto_deps_export;
let _ = ensure_test_proto_deps;
let args = LoadArgs ;
let manual = load?;
Serialize with
switchback-codec-pb
(ProtobufCodec, default filename switchback.binpb).
Compilers and features
Default features enable both compilers:
| Feature | Dependency | Fallback |
|---|---|---|
protoc (default) |
protoc-bin-vendored |
PATH protoc |
buf (default) |
buf-tools 1.70.0-hotfix.1 |
PATH buf |
Disable defaults for slim builds, e.g.
cargo build -p switchback-protobuf --no-default-features --features protoc.
BSR deps for the examples module (Protovalidate) are exported via
ensure_test_proto_deps / proto_deps, mirroring protobuf-mdbook CI.
Link extraction
ProtobufFqnLinkExtractor (ProtobufLinkExtractor) extracts
bare fully-qualified type names from leading-comment prose into intra_links.
Structural cross-refs on operations (StoredEntity.refs) are populated.
Field-level type links inside protobuf fences are not generated (matches
protobuf-mdbook; links appear in RPC signature prose and doc prose only).
See ADR 0004.
Fixtures
Integration tests copy protobuf-mdbook’s examples/proto/ tree to
tests/fixtures/proto/
(including buf.yaml, buf.lock, companion markdown). Loose protos live under
tests/fixtures/loose/.
Tests assert protoc/buf parity, ProtobufCodec round-trip, directory-faithful
source restoration, and buf lint / buf format --diff on restored modules.
Architecture
See ADR 0004.