GPU-rendered, virtualized markdown previewer for very large markdown files.
lazymd previews huge .md files at a smooth 60 fps by combining a block-indexed
document model, lazy per-block layout, a virtualized viewport (only visible blocks
are laid out and painted), and GPU rendering via egui/eframe's wgpu backend.
No webview. No HTML/DOM. No full-document layout — ever.
Requires a stable Rust toolchain (rust-toolchain.toml).
cargo build --releaseRelease profile (from Cargo.toml): strip = true, lto = "thin",
codegen-units = 1, panic = "abort".
cargo run --release -- path/to/file.mdOr after a release build:
./target/release/lazymd path/to/file.mdPer-OS templates live under packaging/. They expect a release binary at
target/release/lazymd (or lazymd.exe on Windows). Pass an explicit path to
override.
| Platform | Script | Outputs (when tooling present) |
|---|---|---|
| macOS | packaging/macos/build.sh |
.app + .app.zip (universal via lipo documented in-script) |
| Windows | packaging/windows/build.ps1 |
staged .exe + .zip (MSI / embed-resource documented) |
| Linux | packaging/linux/build.sh |
.tar.gz; .deb via cargo-deb; AppImage via linuxdeploy |
# macOS
./packaging/macos/build.sh # or: ./packaging/macos/build.sh path/to/lazymd
# Windows (PowerShell)
pwsh ./packaging/windows/build.ps1
pwsh ./packaging/windows/build.ps1 -Binary path\to\lazymd.exe
# Linux
./packaging/linux/build.sh # or pass an explicit binary pathCI: push a v* tag to run .github/workflows/release.yml (matrix build on
macOS / Ubuntu / Windows, uploads the release binary and packaged artifacts).
Without Developer ID / notarization credentials, clear quarantine once and open:
xattr -dr com.apple.quarantine dist/macos/lazymd.app
open dist/macos/lazymd.appassets/icon.png is a 256×256 placeholder. See assets/README.md. Packaging
scripts can produce .icns / .ico and embed them when platform tooling is
available.
Templates register .md / markdown MIME types where the packager supports it
(macOS Info.plist document types; Linux .desktop MimeType; Windows via
optional WiX).
- Full Mermaid diagram rendering (planned v2; v1 shows the code + a label)
- Raw non-table HTML is rendered as visible text, not as rendered HTML (browserless design)
- CJK font fallback (planned v2)
- Inline images render only when standalone (block-level
![]()); inline images in sentences show alt text - HTML
<table>blocks are parsed into native tables (simple tables; complex nested/colspan may degrade)
- Editing (this is a previewer)
- Mermaid / math (katex-rs hooks: defer behind per-block async placeholders)
- Text selection across blocks
- Export to HTML/PDF
- CJK font fallback
- Plugins