api-bones-protos 0.2.0

Embedded bytes of the api-bones canonical proto shapes (bones/v1/*.proto). Pair with `proto-build-kit` to stage on the protoc include path at build time.
Documentation
  • Coverage
  • 100%
    2 out of 2 items documented1 out of 2 items with examples
  • Size
  • Source code size: 27.33 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 248.89 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • brefwiz/api-bones
    3 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • gsalingu

api-bones-protos

crates.io docs.rs

Embedded bytes of the canonical proto shapes shipped by the api-bones crate ecosystem (bones/v1/*.proto).

Zero runtime dependencies. This crate exists purely as a distribution mechanism for the proto bytes. Pair it with a staging library (e.g. proto-build-kit) to write the bytes to a tempdir at protoc-relative paths at consumer build time:

use proto_build_kit::Stager;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let staged = Stager::new()
        .with(api_bones_protos::files())
        .stage()?;

    // Add staged.path() to your codegen include path:
    connectrpc_build::Config::new()
        .files(&["proto/my/v1/svc.proto"])
        .includes(&["proto/", staged.path()])
        .include_file("_connectrpc.rs")
        .compile()?;
    Ok(())
}

What's included

File Messages
bones/v1/pagination.proto PageRequest, PageResponse, OffsetPageRequest, OffsetPageResponse
bones/v1/queries.proto SortDirection, SortField, SortParams, FilterOp, FilterEntry, FilterParams, SearchParams
bones/v1/errors.proto ValidationFailure
bones/v1/ratelimit.proto RateLimitInfo

See proto/README.md in the api-bones repo for the canonical schema inventory and the per-message Rust counterparts in the api-bones crate.

License

MIT.