#common-mark #egui

macro egui_commonmark_macros

Embed markdown directly into the binary as egui widgets

9 releases (breaking)

Uses new Rust 2024

0.22.0 Oct 9, 2025
0.21.1 Jul 13, 2025
0.20.0 Feb 4, 2025
0.19.0 Dec 17, 2024
0.16.0 May 12, 2024

#1646 in GUI

Download history 294/week @ 2025-10-09 99/week @ 2025-10-16 76/week @ 2025-10-23 136/week @ 2025-10-30 9/week @ 2025-11-06 38/week @ 2025-11-13 91/week @ 2025-11-20 122/week @ 2025-11-27 20/week @ 2025-12-04 40/week @ 2025-12-11 4/week @ 2025-12-18 8/week @ 2025-12-25 25/week @ 2026-01-01 945/week @ 2026-01-08 430/week @ 2026-01-15 5/week @ 2026-01-22

1,405 downloads per month
Used in 3 crates (via egui_commonmark)

MIT/Apache

88KB
2K SLoC

A commonmark viewer for egui

Crate Documentation

showcase

This crate is egui_commonmark's compile time variant. It is recommended to use this crate through egui_commonmark by enabling the macros feature.

Usage

In Cargo.toml:

egui_commonmark = "0.22"
# Specify what image formats you want to use
image = { version = "0.25", default-features = false, features = ["png"] }

Example

use egui_commonmark::{CommonMarkCache, commonmark};
let mut cache = CommonMarkCache::default();
let _response = commonmark!(ui, &mut cache, "# ATX Heading Level 1");

Alternatively you can embed a file

Example

use egui_commonmark::{CommonMarkCache, commonmark_str};
let mut cache = CommonMarkCache::default();
commonmark_str!(ui, &mut cache, "content.md");

License

Licensed under either of

at your option.

Dependencies

~9MB
~186K SLoC