Skip to content
akmarwah03Public

About

GPU-rendered, virtualized markdown previewer for huge files (egui/wgpu + Rust)

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

lazymd

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.

Build

Requires a stable Rust toolchain (rust-toolchain.toml).

cargo build --release

Release profile (from Cargo.toml): strip = true, lto = "thin", codegen-units = 1, panic = "abort".

Run

cargo run --release -- path/to/file.md

Or after a release build:

./target/release/lazymd path/to/file.md

Packaging

Per-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 path

CI: push a v* tag to run .github/workflows/release.yml (matrix build on macOS / Ubuntu / Windows, uploads the release binary and packaged artifacts).

Unsigned macOS runs

Without Developer ID / notarization credentials, clear quarantine once and open:

xattr -dr com.apple.quarantine dist/macos/lazymd.app
open dist/macos/lazymd.app

Icons

assets/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.

File associations

Templates register .md / markdown MIME types where the packager supports it (macOS Info.plist document types; Linux .desktop MimeType; Windows via optional WiX).

Known limitations (v1)

  • 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)

Out of scope (v2)

  • 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

About

GPU-rendered, virtualized markdown previewer for huge files (egui/wgpu + Rust)

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages