# Synta Documentation
Synta is an ASN.1 parser and code-generation library with Rust, C, and Python
interfaces. Documentation is organized as four navigable mdbooks — one per
audience — plus a few standalone references.
---
## Books
### Rust API
[→ Open Rust API book](rust/src/index.html)
The primary developer reference for Rust users.
- Getting started, installation, and quickstart
- Step-by-step tutorial (decoding, encoding, PKI workflow)
- `synta-codegen` code-generation guide: type mappings, naming, tagged fields,
owned vs. borrowed strings, `no_std` support
- ASN.1 type reference: primitives, strings, constructed types, limitations
- PKI types: `Certificate`, `CertificateList`, `OCSPResponse`, `PrivateKey`,
extension access, X.509 path validation
- Best practices, API reference, migration guides (OpenSSL, libtasn1),
troubleshooting
### C Bindings
[→ Open C Bindings book](c/src/index.html)
Reference for users of the `libcsynta` C FFI layer and `synta-codegen` C output.
- Installation and linking (pkg-config, CMake, `cargo-c`)
- `synta-codegen` C output: type mappings, OPTIONAL/DEFAULT, tagged fields,
CHOICE dispatch, constraints, arena allocator, build system integration
- Full `libcsynta` API: decoder, encoder, helper types, X.509 PKI, CMS
- Memory model: borrowed vs. owned `SyntaByteArray`, pitfalls, RAII wrappers
- Annotated example programs
### Python Bindings
[→ Open Python Bindings book](python/src/index.html)
Reference for Python users of the `synta` package.
- Installation, quickstart, and module layout
- Core ASN.1 codec: `Decoder`, `Encoder`, all primitive and string types,
time types, `ObjectIdentifier`, error handling
- X.509 PKI: `Certificate`, `CertificationRequest`, `CertificateList`,
`OCSPResponse`, `PublicKey`/`PrivateKey`, extension builders, PyCA interop,
X.509 path validation
- CMS cryptography, protocol schemas (Kerberos, PKIX, SPNEGO, MTC)
- OID reference, performance notes, development guide
- 28 annotated example programs
### Performance
[→ Open Performance book](perf/src/index.html)
Benchmark results and analysis across all interfaces.
- Test environment and methodology
- Quick-reference summary table
- Library comparison: parse-only, parse+all-fields, post-quantum (ML-DSA-65)
- Scalability across certificate sizes; Element vs. Typed API overhead
- PKCS#7 and PKCS#12 extraction benchmarks
- Real-world CA store benchmarks (Mozilla NSS, CCADB, synthetic ML-DSA)
- Pipeline benchmarks: MTC (`mtcbench`) and X.509 PKI (`x509bench`),
including a full P-256 vs. ML-DSA-65 sweep across 11 batch sizes
- ASN.1 primitive performance
---
## Standalone references
| [Limitations](limitations.md) | Unsupported ASN.1 constructs and workarounds |
| [Post-Quantum OIDs](POST_QUANTUM_OIDS.md) | ML-DSA and ML-KEM OID constants |
| [Contributing](contribution.md) | Development setup, CI, coding conventions, release process |
| [Rust Examples](https://codeberg.org/abbra/synta/src/branch/main/examples) | Annotated list of Rust example programs |
| [C Examples](https://codeberg.org/abbra/synta/src/branch/main/synta-ffi/examples/c) | Annotated list of C example programs |
---
## Quick links
```
cargo doc --open # Rust API docs (generated)
cargo build -p synta-ffi # C FFI library
pip install synta # Python package
cargo run -p synta-codegen -- --help # ASN.1 code generator CLI
```