5 releases

0.1.4 Mar 1, 2025
0.1.3 Sep 20, 2023
0.1.2 Aug 8, 2023
0.1.1 May 8, 2021
0.1.0 Oct 24, 2020

#62 in Visualization

Download history 635/week @ 2024-11-16 290/week @ 2024-11-23 440/week @ 2024-11-30 371/week @ 2024-12-07 332/week @ 2024-12-14 88/week @ 2024-12-21 55/week @ 2024-12-28 79/week @ 2025-01-04 217/week @ 2025-01-11 185/week @ 2025-01-18 240/week @ 2025-01-25 261/week @ 2025-02-01 139/week @ 2025-02-08 166/week @ 2025-02-15 135/week @ 2025-02-22 409/week @ 2025-03-01

900 downloads per month
Used in 17 crates (4 directly)

MIT/Apache

300KB
7K SLoC

C 7K SLoC // 0.1% comments Rust 163 SLoC // 0.0% comments

Pikchr - Diagram renderer

Taken from the pikchr homepage:

Pikchr (pronounced like "picture") is a PIC-like markup language for diagrams in technical documentation. Pikchr is designed to be embedded in fenced code blocks of Markdown (or in similar mechanisms in other markup languages) to provide a convenient means of showing diagrams.

This crate wrappers the pikchr.c version downloaded from that website on the 28th February 2025.

You can use it as follows:

use pikchr::{Pikchr, PikchrFlags};

let piccy = Pikchr::render(
    diagram_str,
    None,
    PikchrFlags::default()).unwrap();

println!("{}", piccy);

There is a little helper program that reads a Pikchr file named on the command line and renders it as SVG to the standard output:

cargo run -p pikchr-cli -q foo.pikchr > foo.svg

You can install it with cargo install pikchr-cli (cargo install --path=pikchr-cli from the source tree).

Dependencies

~0.4–350KB