8 releases (4 breaking)

0.5.1 May 31, 2024
0.5.0 May 14, 2024
0.4.0 Apr 24, 2024
0.3.4 Apr 23, 2024
0.1.0 Mar 28, 2024

#8 in #asciidoc

Download history 131/week @ 2024-03-25 226/week @ 2024-04-01 64/week @ 2024-04-08 151/week @ 2024-04-15 285/week @ 2024-04-22 9/week @ 2024-04-29 145/week @ 2024-05-13 34/week @ 2024-05-20 198/week @ 2024-05-27 28/week @ 2024-06-03 25/week @ 2024-06-10

291 downloads per month
Used in 3 crates (2 directly)

MIT license


🤓 Asciidork

An Asciidoc parser/backend written in Rust


# requires rust/cargo toolchain
cargo install asciidork-cli
or install from source
git clone https://github.com/jaredh159/asciidork
cd asciidork
cargo build --release --bins

# vvvv -- OPTIONAL: or use rel path to `./target/release/asciidork` instead
sudo cp ./target/release/asciidork /usr/local/bin


# read the friendly manual
asciidork --help

# parse/convert/print from a file
asciidork --input test.adoc

# without a --input arg, it reads from stdin
echo "foo _bar_ *baz*" | asciidork
asciidork < test.adoc

# don't include enclosing document structure by passing `--embedded`
asciidork --input test.adoc --embedded

# send output to a file (alternatively just redirect stdout)
asciidork --input test.adoc --embedded --output test.html

# print information about perf (did i mention it's written in Rust btw?)
asciidork --input test.adoc --print-timings

# print pretty html (requires `pretter` -- install w/ `npm i -g prettier`)
asciidork --input test.adoc --embedded --format dr-html-prettier


The Asciidork parser and dr-html backend compiles to WASM to run in the browser! (Did I mention it's written in Rust?) NPM package coming soon, but for now you can see it in action here:


Be sure to pop the dev tools to see timing info.


[!WARNING] Asciidork is not complete. It implements a majority of the documented behavior of Asciidoc, but there are several unfinished areas, missing error handling, edge cases galore! Consider it a technology preview only for now.

Known unfinished or unimplemented areas include:

  • CSV Tables
  • STEM
  • Source highlighting
  • Include directives
  • All entity refs

PRs welcome! 👍