Skip to content

Latest commit

 

History

History
100 lines (67 loc) · 4.28 KB

File metadata and controls

100 lines (67 loc) · 4.28 KB

Markdown Reader - Built with Rust and the Iced GUI framework

A fast, lightweight, and hardware-accelerated Markdown reader for desktop, built with Rust and the Iced GUI framework. It processes markdown files seamlessly with native rendering, optimized for performance and offline usage.

Features

  • Native File Picking: Open local .md or .markdown files using native OS dialogs via rfd.
  • Rich Text Markdown Rendering: Full support for headers, paragraphs, lists, rules, blockquotes, and complex inline formatting.
  • Real-Time Theme Selection: Switch seamlessly between a comprehensive catalog of built-in Iced themes (e.g., Dracula, Nord, GitHub) with instant UI adaptation.
  • Dynamic Syntax Highlighting: Automatic offline syntax highlighting for code blocks powered by syntect, matching the application's active light/dark theme.
  • Native Mermaid Integration: Instantly parses and renders Mermaid diagrams via mermaid-rs-renderer directly into hardware-accelerated SVG widgets, without relying on webviews or internet connectivity.
  • High-Performance Zoom: Zero-allocation AST caching ensures buttery-smooth font scaling and UI zooming at 60/120 FPS.
    • Shortcuts: Ctrl + +, Ctrl + -, Ctrl + 0, and Ctrl + Mouse Wheel Scroll.
  • Multi-Language Support (i18n): Fully internationalized UI with support for English and Portuguese (Brazil), powered by rust-i18n.
  • Native Image Support: Seamlessly renders local images (![alt](url)) with relative path resolution and hardware-accelerated scaling.

⚙️ Stack

  • Rust: Core executable language.
  • Iced v0.14: Cross-platform GUI library powered by WGPU.
  • Tokio v1.50: Asynchronous runtime for non-blocking file I/O operations.
  • Pulldown-cmark: Fast, specification-compliant Markdown parser.
  • Syntect: Syntax highlighting using Sublime Text definitions.
  • mermaid-rs-renderer: Extremely fast offline Mermaid to SVG rendering in pure Rust.
  • rust-i18n: Compile-time internationalization support.

Demo

App Markdown Reader

App Markdown Reader

App Markdown Reader

App Markdown Reader

App Markdown Reader

App Markdown Reader

App Markdown Reader

App Markdown Reader

App Markdown Reader

App Markdown Reader

App Markdown Reader

🚀 Installation & Setup

1. Install Rust

This application requires Rust 1.80.0 or higher. The official and recommended way to install Rust is via rustup:

Linux / macOS:

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Windows: Download and run rustup-init.exe from rustup.rs.

Verify your installation worked properly:

rustc --version

2. System Prerequisites

Ensure your system has basic build essentials and graphics drivers (Vulkan/Metal/DX12) installed, as they are required by WGPU for hardware acceleration.

3. Clone and Run

Development Mode

To run the application with debug assertions (faster compilation, unoptimized execution):

cargo run

Production Build

To build the application with maximum optimizations (Release profile includes LTO, abort on panic, and stripped symbols):

cargo build --release

Executing the Binary Directly

After building in release mode, the compiled, standalone binary will be generated inside the target/release/ directory. You can execute it directly or install it to your system binaries:

# Execute the binary directly
./target/release/markdown-reader

# Or install it locally to your cargo path
cargo install --path .

https://gilcierweb.com.br