docs.rs failed to build sunbeam-g2v-0.6.0
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.
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.
Visit the last successful build:
sunbeam-g2v-0.3.3
Sunbeam Service Framework (g2v)
A ConnectRPC-based framework for building microservices in Rust. The name is the Sun's spectral classification (G2V — main-sequence yellow dwarf), not a backronym.
The TypeScript client (
@sunbeam/g2v) moved out of this repository and now lives in the sdk repo atsdk/typescript/. This repository is the Rust framework.
Features
- Service trait —
SunbeamServicewithon_start/on_stophooks and graceful shutdown - Configuration — Figment-based config with env-var support via
ServiceConfig - Server builders —
ServerBuilder→AxumServer(orStandaloneServer) with one-shotserve() - Middleware stack — multitenancy-aware auth (bearer token / session cookie / session token), ReBAC permission enforcement, Prometheus metrics, panic recovery
- Request tracing —
x-request-idhonored/generated/echoed on every request and OpenTelemetry server spans with W3C trace-context propagation, both applied by default - Observability bootstrap —
telemetry::initwirestracingspans into OpenTelemetry and exports OTLP/HTTP to a collector - Database — SQLx Postgres integration with
connect/connect_eagerand automatic migrations - Message queue — NATS / JetStream wrapper (
NatsClient) with stream and consumer helpers - Leader election — Pluggable
LeaderElectiontrait with Vault and NATS implementations - Client resiliency — unified HTTP client with retry (incl. opt-in 401 refresh), circuit breaker, cache, and automatic
x-request-id/ trace-context propagation - Health checks —
HealthRouterexposing/health/liveand/health/ready - Testing —
TestHarness(boots a real server on a random port),MockService, data fixtures, integration tests backed by the sdk's testcontainer builders - Proc-macros —
#[derive(Instrumented)]and#[derive(Metrics)]
Quick Start
use *;
async
Example
The example exposes public, authenticated, and permission-authorized routes
plus a ConnectRPC Eliza service; see examples/simple/main.rs.
Repository Layout
.
├── src/ # sunbeam-g2v crate source
├── sunbeam-g2v-derive/ # proc-macro crate (Instrumented, Metrics derives)
├── tests/ # integration tests (sdk testcontainer builders)
├── examples/ # runnable examples
├── proto/ # protobuf definitions
└── docs/ # guides and architecture docs
Documentation
License
MIT — see LICENSE.md.