Skip to main content

docling_core/
lib.rs

1//! Core data model for docling.rs.
2//!
3//! This crate is the Rust counterpart of the `docling-core` Python package: it
4//! owns the unified [`DoclingDocument`] representation that every backend
5//! produces and every serializer consumes. Keeping it dependency-light and
6//! separate from the conversion logic mirrors the Python split between
7//! `docling-core` (the schema) and `docling` (the converters).
8//!
9//! Phase 0 models a simplified, linear node tree that is enough to round-trip
10//! through Markdown. The faithful, `$ref`-based schema that matches
11//! docling-core's JSON wire format lands in Phase 1 (see `MIGRATION.md`).
12
13pub mod base64;
14pub mod chunker;
15mod doclang;
16mod document;
17mod json;
18mod labels;
19mod markdown;
20
21pub use doclang::inline_runs_from_markdown;
22pub use document::{
23    inline_paragraph_node, ContentLayer, DoclingDocument, FieldItem, InlineRun, ListItemDclx, Node,
24    PictureImage, Script, Table, TableStructure,
25};
26pub use labels::DocItemLabel;
27pub use markdown::{ImageMode, MarkdownStreamer};