Cargo Features

[dependencies]
egui_commonmark = { version = "0.19.0", default-features = false, features = ["macros", "nightly", "dump-macro", "pulldown_cmark", "better_syntax_highlighting", "load-images", "svg", "fetch", "embedded_image", "document-features"] }
default = load-images, pulldown_cmark

These default features are set whenever egui_commonmark is added without default-features = false somewhere in the dependency tree.

macros nightly?

Enable proc macros for compile time generation of egui widgets from markdown For simplicity it only supports pulldown-cmark

Enables egui_commonmark_macros

Tests won't build otherswise

nightly = macros

Builds upon the macros feature. Enables tracking of markdown files to recompile when their content changes. Uses nightly features

Enables nightly of egui_commonmark_macros

dump-macro

For internal debugging use only!

Enables dump-macro of egui_commonmark_macros

pulldown_cmark default

No-op feature

better_syntax_highlighting

Syntax highlighting for code blocks using syntect

Enables better_syntax_highlighting of egui_commonmark_backend

load-images default

Enable loading of images. Make sure to also opt in to what image format you need through the image crate.

Enables file and image of egui_extras

svg

Support loading svg images

Enables svg of egui_extras

fetch

Images with urls will be downloaded and displayed

Enables http of egui_extras

embedded_image

Allows loading base64 image data urls from within markdown files. e.g: data:image/png;base64,... Note that this is really space inefficient. No size limit is in place for the maximum allowed data in the url.

This enables the data urls for your entire app as it installs an egui bytes loader in in the background.

Currently this does not support wasm.

Enables embedded_image of egui_commonmark_backend

Features from optional dependencies

document-features implicit feature

Enables document-features

document-features:

Extract documentation for the feature flags from comments in Cargo.toml