| Crates.io | proto-sign |
| lib.rs | proto-sign |
| version | 0.1.1 |
| created_at | 2025-11-09 08:14:09.589822+00 |
| updated_at | 2025-11-09 08:14:09.589822+00 |
| description | Semantic protocol buffer analysis tool for detecting breaking changes |
| homepage | |
| repository | https://github.com/actor-rtc/proto-sign |
| max_upload_size | |
| id | 1923802 |
| size | 685,051 |
A Rust tool for Protocol Buffers compatibility checking and semantic fingerprinting.
# Build from source
git clone https://github.com/your-org/proto-sign.git
cd proto-sign
cargo install --path .
# Extract test configurations (for development)
bash ./compat-configs/extract_buf_configs.sh
# Basic breaking change check
proto-sign breaking old.proto new.proto
# JSON output
proto-sign breaking old.proto new.proto --format json
# Use specific rule categories
proto-sign breaking old.proto new.proto --use-categories FILE,WIRE
# Three-level compatibility assessment (Green/Yellow/Red)
proto-sign compare old.proto new.proto
# Generate semantic fingerprint
proto-sign fingerprint file.proto
Proto-Sign uses YAML configuration files. Copy a template to get started:
# Choose a configuration template
cp compat-configs/examples/strict-mode.yaml proto-sign.yaml
# Use custom configuration
proto-sign breaking old.proto new.proto --config proto-sign.yaml
strict-mode.yaml - All rule categories (recommended for public APIs)lenient-mode.yaml - Balanced mode for internal APIswire-only.yaml - Binary compatibility onlyspecific-rules.yaml - Custom rule selectionversion: v1
breaking:
use_categories:
- FILE
- PACKAGE
- WIRE
- WIRE_JSON
except_rules:
- FIELD_SAME_JSON_NAME
ignore:
- "generated/**"
ignore_unstable_packages: true
use proto_sign::spec::{Spec, Compatibility};
let old_spec = Spec::try_from(old_proto_content)?;
let new_spec = Spec::try_from(new_proto_content)?;
match old_spec.compare_with(&new_spec) {
Compatibility::Green => println!("No changes"),
Compatibility::Yellow => println!("Backward compatible"),
Compatibility::Red => println!("Breaking changes detected"),
}
// Detailed analysis
let result = old_spec.check_breaking_changes(&new_spec);
for change in result.changes {
println!("{}: {}", change.rule_id, change.message);
}
Apache License 2.0
Breaking change detection rules ported from Buf.