docspec
Streaming document conversion. Convenience facade re-exporting the DocSpec readers, writers, and core event types.
Use this crate when you want a single entry point. For the smallest possible dependency
footprint, depend directly on the individual sub-crates (docspec-core,
docspec-markdown-reader, etc.) instead.
Usage
[]
= { = "0.5", = ["markdown", "blocknote"] }
use MarkdownReader;
use BlockNoteWriter;
use ;
let markdown = "# Hello\n\nWorld";
let mut reader = new;
let mut buf = Vec::new;
let mut writer = new;
while let Some = reader.next_event?
writer.finish?;
Feature Flags
Readers
| Feature | Format | Crate |
|---|---|---|
markdown |
Markdown (CommonMark + GFM tables/strikethrough) | docspec-markdown-reader |
Writers
| Feature | Format | Crate |
|---|---|---|
blocknote |
BlockNote JSON | docspec-blocknote-writer |
oxa |
oxa.dev JSON | docspec-oxa-writer |
Primitives
| Feature | Crate | Use case |
|---|---|---|
json |
docspec-json |
Building custom JSON-based writers |
Convenience
| Feature | Enables |
|---|---|
all-readers |
All reader features |
all-writers |
All writer features |
full |
Everything (all-readers + all-writers + json) |
No features are enabled by default — opt into what you need.
Documentation
See the main DocSpec repository for the full project documentation, architecture, and event protocol.