panproto-protocols
Built-in protocol definitions for panproto.
Each protocol is defined by a schema theory GAT and an instance theory GAT, composed via colimit from reusable building-block theories. This crate includes parsers for each protocol's native schema format (Lexicon, DDL, .proto, SDL, JSON Schema).
Supported Protocols
| Protocol | Schema type | Instance type | Parser |
|---|---|---|---|
| ATProto | Constrained multigraph | W-type | Lexicon JSON |
| SQL | Hypergraph | Set-valued functor | DDL |
| Protobuf | Simple graph | Flat | .proto files |
| GraphQL | Typed graph | W-type | SDL |
| JSON Schema | Constrained multigraph | W-type | JSON Schema |
API
| Item | Description |
|---|---|
atproto |
ATProto protocol definition, Lexicon parser, and theory registration |
sql |
SQL protocol definition, DDL parser, and theory registration |
protobuf |
Protobuf protocol definition, .proto parser, and theory registration |
graphql |
GraphQL protocol definition, SDL parser, and theory registration |
json_schema |
JSON Schema protocol definition, parser, and theory registration |
theories |
Shared component theory definitions (building-block GATs) |
ProtocolError |
Error type for protocol operations |
Example
use atproto;
let protocol = protocol;
let schema = parse_lexicon?;