Rust implementation of Carve - a lightweight markup language for documents and the web: parser, HTML renderer, and carve CLI.
https://markup-carve.github.io/carve/ ↗// readme
carve-rs
Rust parser and renderer for the Carve markup language. The crate implements Carve spec 0.1 and renders HTML, Markdown, plain text, ANSI, and canonical Carve source. The versioning contract says what a release may change.
Install
cargo add carve-lang
Install the CLI with cargo install carve-lang, or download a release archive.
The package name is carve-lang; Rust code imports it as carve, and the CLI
binary is named carve.
Library use
let html = carve::to_html("# Hello\n\nThis is /italic/ and *bold*.");
Lower-level functions expose the typed AST:
let document = carve::parse(source);
let html = carve::render_html(&document)?;
Use fallible entry points for imported content and caller-built trees:
let document = carve::from_json(payload)?;
let serialized = carve::try_to_json(&document)?;
let source = carve::try_markdown_to_carve(markdown)?;
AstJsonError::kind() distinguishes syntax, depth, unknown-field, and other AST
refusals. path() identifies an unknown field; syntax errors expose line(),
column(),…