Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Rust SDK reference

The Rust surface of panproto is the panproto-core facade. Add it to your Cargo.toml:

[dependencies]
panproto-core = "0.49"

Full type signatures, constructors, and method documentation live on docs.rs:

Feature flags

FeatureEffect
full-parsePulls in panproto-parse and tree-sitter-based AST parsing.
projectPulls in panproto-project for multi-file project assembly.
gitPulls in panproto-git for the git bridge.
llvmEnables LLVM-backed lowering via panproto-llvm.
jitEnables JIT-compiled migration via panproto-jit.
tree-sitterEnables tree-sitter-based format-preserving parsing for built-in protocols (forwards to panproto-io/tree-sitter).

The default feature set re-exports the always-on crates: panproto-gat, panproto-schema, panproto-inst, panproto-mig, panproto-lens, panproto-check, panproto-protocols, panproto-io, and panproto-vcs. The feature flags above pull in the optional crates on top.

Sub-crate lookup

For lower-level work, depend on individual crates rather than the facade. The crate map lists every workspace member with a one-line description and a link to its docs.rs page.

TaskCrate
Define a GAT in Rustpanproto-gat, panproto-gat-macros
Validate a schema against a protocolpanproto-schema, panproto-protocols
Parse data and produce an instancepanproto-io, panproto-inst
Build and apply a migrationpanproto-mig
Construct or compose lensespanproto-lens
Write lenses in the lens DSLpanproto-lens-dsl
Use the expression languagepanproto-expr, panproto-expr-parser
Version-control schemas and datapanproto-vcs, panproto-git
Parse full ASTs across 261 languagespanproto-parse
Decorate an abstract schema with a layout fibrepanproto-parse (ParserRegistry::decorate, ParserRegistry::pretty_with_protocol)
Distinguish abstract and decorated schemas at the type levelpanproto-schema (AbstractSchema, DecoratedSchema, LayoutWitness)

See also