Skip to main content

asdf_core/
lib.rs

1//! The ASDF engine: file layout, binary blocks, and the tree.
2//!
3//! This crate holds all the behaviour. The C ABI shim (`libasdf-rs`) and the
4//! idiomatic Rust API (`asdf`) are both thin projections of it, so the two
5//! public faces cannot drift apart in semantics. Nothing here knows about C.
6
7// The engine is safe Rust with exactly one exception: memory-mapping a file
8// for reading, which no safe API can express. `deny` rather than `forbid` so
9// that one use can be allowed explicitly and reviewed on sight; every
10// `#[allow(unsafe_code)]` in this crate must carry a justification.
11#![deny(unsafe_code)]
12
13pub mod block;
14pub mod compression;
15pub mod core;
16pub mod error;
17pub mod events;
18pub mod info;
19pub mod layout;
20pub mod reader;
21pub mod version;
22pub mod writer;
23
24/// The ASDF YAML layer: document model, parser and emitter.
25///
26/// Re-exported so that crates layered on the engine -- the C ABI shim and the
27/// idiomatic API -- have a single dependency edge rather than needing to
28/// track `asdf-yaml`'s version themselves.
29pub use asdf_yaml as yaml;
30
31pub use error::{Error, ErrorCode, Result};
32pub use layout::{Layout, scan};
33pub use reader::{ChecksumStatus, Reader};
34pub use version::Version;
35pub use writer::{PendingBlock, WriteOptions, Writer};