Skip to content
API

Install

fleuron is not on crates.io yet, so the Rust routes below point at the repository.

You need Rust 1.85 or newer. The workspace is on the 2024 edition.

Cargo.toml
[dependencies]
fleuron = { git = "https://github.com/zachhannum/fleuron" }
fleuron-markdown = { git = "https://github.com/zachhannum/fleuron" }

fleuron-markdown reads markdown into a structured content tree and is optional if you use the content tree directly.

Next: the library quickstart.

Terminal window
cargo install --git https://github.com/zachhannum/fleuron fleuron-cli

That puts a fleuron binary on your path. It reads markdown and writes a PDF. Author stylesheets go in through repeatable -c flags.

Terminal window
fleuron manuscript.md -o book.pdf -c book.css

Next: the CLI quickstart.

Terminal window
npm install fleuron

You get the module, a worker, a client, a display-structure reader and an SVG painter.

Terminal window
npm install fleuron-react

That is the same preview as a React component, and nothing else.

Next: the wasm quickstart, or the demos, which run this package in your browser.

Terminal window
git clone https://github.com/zachhannum/fleuron
cd fleuron
cargo test --workspace

The end-to-end test runs the fixture book through the CLI and checks the PDF. It needs qpdf and pdftotext (from poppler) on the path. Without them it skips the validation instead of failing.