blazingly-contract 0.3.1

Runtime-neutral, canonical API contracts for Blazingly
Documentation
  • Coverage
  • 25.13%
    50 out of 199 items documented0 out of 84 items with examples
  • Size
  • Source code size: 79.64 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.04 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • sergii-ziborov/blazingly-contract
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • sergii-ziborov

blazingly-contract

Runtime-neutral, canonical API contracts for Blazingly.

The crate owns the semantic source of truth shared by HTTP, MCP, AI documentation, internal RPC, and future mesh tooling:

  • versioned canonical encoding independent of declaration order;
  • model, input, output, typed-error, dependency, and security metadata;
  • aliases, nested validation, and stable custom-validator identities;
  • pull-based streaming request-body inputs without a runtime dependency;
  • MCP discovery and agent risk, confirmation, and idempotency policies;
  • SHA-256 contract fingerprints;
  • semantic compatibility reports.

It intentionally does not depend on Tokio, an HTTP server, an MCP transport, proc macros, or runtime dependency injection. The default std feature can be disabled for no_std + alloc consumers.

use blazingly_contract::{Compatibility, OperationContract};

fn verify_upgrade(previous: &OperationContract, current: &OperationContract) {
    let report = Compatibility::compare(previous, current);
    assert!(report.is_backward_compatible());
    println!("{}", current.fingerprint());
}

The Rust API follows SemVer. Canonical bytes and fingerprints are additionally versioned by CURRENT_CONTRACT_FORMAT_VERSION; changing the crate version does not silently change a contract fingerprint.

Version 0.3 uses canonical format 1.2, which adds streaming-body input metadata while preserving deterministic ordering and compatibility classification.

Licensed under the MIT License.