17 stable releases
| 2.0.32 | Sep 1, 2025 |
|---|---|
| 2.0.30 | Aug 31, 2025 |
| 0.1.9 | Aug 29, 2025 |
#2451 in Parser implementations
702 downloads per month
Used in canon-cli
25KB
499 lines
Canon Protocol Library
Core types and validation for the Canon Protocol specification format.
Overview
This library provides the fundamental data structures and parsing logic for the Canon Protocol, including:
- Specification types - Core data structures for Canon specifications
- Dependency parsing - URI parsing and dependency resolution
- Repository configuration - Management of Canon repositories
- Manifest and signatures - Cryptographic verification structures
Usage
Add to your Cargo.toml:
[dependencies]
canon-protocol = "0.1"
Then use in your code:
use canon_protocol::{Dependency, CanonSpecification, CanonRepository};
// Parse a dependency URI
let dep = Dependency::parse("canon-protocol.org/type@1.0.0")?;
// Create a new repository configuration
let repo = CanonRepository::new();
Features
- Type-safe - Strongly typed representations of Canon Protocol structures
- Validation - Built-in validation for specifications and dependencies
- Serialization - Full serde support for YAML and JSON
- Error handling - Comprehensive error types with context
License
Apache-2.0
Dependencies
~6–8MB
~148K SLoC