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.
As a Rust library
Section titled “As a Rust library”[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.
As a command-line binary
Section titled “As a command-line binary”cargo install --git https://github.com/zachhannum/fleuron fleuron-cliThat puts a fleuron binary on your path. It reads markdown and writes a PDF. Author stylesheets go in through repeatable -c flags.
fleuron manuscript.md -o book.pdf -c book.cssNext: the CLI quickstart.
As an npm package
Section titled “As an npm package”npm install fleuronYou get the module, a worker, a client, a display-structure reader and an SVG painter.
npm install fleuron-reactThat 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.
Working on fleuron itself
Section titled “Working on fleuron itself”git clone https://github.com/zachhannum/fleuroncd fleuroncargo test --workspaceThe 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.