# sif-parser
A complete, standalone implementation of the Structured Interchange Format
(SIF) v1 -- parser, emitter, streaming protocol, packed binary encoding, and
format conversion. Zero external dependencies.
## Features
- **Parsing** -- parse SIF documents with full support for schemas, blocks,
templates, sections, inline annotations, and CDC operations.
- **Emitting** -- produce well-formed SIF output from `Document` values.
- **Streaming** -- SIF Streaming Protocol v1 with multiplexing, schema
evolution, flow control, and heartbeat.
- **Packed binary** -- compact binary encoding for SIF data.
- **Format conversion** -- convert between SIF and JSON, JSONL, and CSV.
- **Type inference** -- infer schemas and types from untyped data.
## Quick Example
```rust
use sif_parser::{parse, Document};
let input = "\
#schema | id:int | name:str | active:bool
";
let doc: Document = parse(input).unwrap();
assert_eq!(doc.blocks.len(), 1);
assert_eq!(doc.blocks[0].records.len(), 2);
```
## Independence from forma
This crate is a standalone SIF parser with no dependency on the forma
serialization framework. It can be used on its own wherever SIF parsing or
generation is needed. The `forma_sif` crate builds on top of this one to
provide forma trait integration.
## License
Licensed under the [MIT License](LICENSE-MIT).