AsciiDoc to HTML, DOCX and JSON.
One binary. No Ruby.
adoctra is an AsciiDoc processor written in Rust: a command-line tool, a library and WASM bindings for editors. It aims at the behavior of Asciidoctor 2.0.23.
cargo install adoctra-cli
Version 0.0.4 — an early release. The API and the output may still change.
What it does
- Full language. Includes and preprocessor directives, document header and attributes, sections, all delimited blocks, lists and callouts, tables with AsciiDoc cells, cross references, footnotes, index terms, STEM and the complete substitution pipeline.
- Modern HTML. Semantic HTML5 with a bundled stylesheet that visually matches Asciidoctor’s default output. Standalone or embedded, HTML or XHTML syntax.
- Word documents. DOCX rendered into a template: every element gets a named style that your own
.docxor.dotxrestyles. More about DOCX. - Syntax highlighting. A port of Rouge with all 228 lexers, built in.
source-highlighter=rougeworks without Ruby. - 58 diagram types. PlantUML, Graphviz, Mermaid, D2, ditaa, barcodes and more — through local tools, Kroki or a PlantUML server. More about diagrams.
- Made for editors. Error-tolerant parsing, byte spans for every block, a highlighting token stream, compiled to WASM. More about WASM.
Familiar command line
adoctra follows the asciidoctor command, so existing build scripts mostly keep working:
adoctra document.adoc # document.html next to the input
adoctra --to docx document.adoc # document.docx
adoctra -a toc -a icons=font -n book.adoc # attributes, numbered sections
adoctra -r asciidoctor-diagram doc.adoc # diagrams
See the command line reference for every option.
Tested against real documentation
The test corpus includes the documentation of Asciidoctor, Spring, Quarkus, Gradle, Hibernate ORM, JUnit and others. Document structure, diagnostics and command-line behavior are compared with Asciidoctor 2.0.23; HTML is compared visually. Known differences are listed openly.