Skip to content
xiaodou997Public

About

Yu Markdown is an open-source, native, Markdown-first visual editor powered by Rust, delivering a fast, local-first Markdown writing experience on macOS and Windows.Yu Markdown 是一款开源、原生、Markdown-first 的所见即所得编辑器。以 Rust 构建共享编辑器内核,为 macOS 和 Windows 提供快速、本地优先的 Markdown 写作体验。

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Yu Markdown Logo

Yu Markdown

A native, Markdown-first visual editor powered by Rust.

English · 简体中文 · 繁體中文 · 日本語 · 한국어

Latest release Apache-2.0

Yu Markdown keeps Markdown source as the single source of truth while giving you a rendered, direct-editing experience. The shared editor core is written in Rust; macOS and Windows use native platform shells, native input systems, and GPU rendering instead of a WebView or Chromium runtime.

Highlights

  • Markdown-first editing — source text is the canonical document model; there is no rich-text round-trip serialization.
  • Visual direct editing — rendered content stays editable through real-time source projection and decorations.
  • Native desktop experience — Swift/AppKit + Metal on macOS; Win32 + DirectWrite/D3D11 + TSF/IME on Windows.
  • Fast incremental engine — parsing, layout, scene updates, and rendering are revision-bound and only recompute changed or visible content.
  • International text support — CJK, emoji, combining characters, bidi/RTL text, and native IME composition are first-class concerns.
  • Local-first files — your Markdown documents remain ordinary files on your machine, with external-change and save-conflict handling.
  • Rich Markdown workflows — code blocks, tables, math, diagrams, images, clipboard/export flows, and system printing are handled without changing the Markdown source-of-truth model.
  • Open source — licensed under Apache-2.0.

Download

Get the current macOS and Windows builds from GitHub Releases.

Platform Current support
macOS Apple Silicon, macOS 26 or newer. Release builds are Developer ID signed and Apple-notarized.
Windows x64, Windows 10 2004 or newer. Installer and portable builds are available; current releases are not Authenticode-signed.
Linux The shared Rust core is validated, but a desktop package is not published yet.

How it works

Yu is intentionally not a WebView Markdown editor, HTML editor, or rich-text editor with Markdown import/export. Its architecture keeps one document truth and one rendering path:

Markdown source
    ↓
Transactions + revisioned snapshots
    ↓
Incremental Markdown syntax
    ↓
Source projection + decorations
    ↓
Native layout
    ↓
Retained scene
    ↓
GPU renderer

Key invariants:

  1. Markdown source is always the canonical document.
  2. Permanent edits go through transactions.
  3. Markdown semantics live in yu-markdown; visual state is represented by decorations.
  4. Derived data is tied to a revision, and stale results are rejected.
  5. IME composition is transient and never corrupts document state.
  6. Platform shells do not parse Markdown.
  7. Caches, async resources, and GPU state cannot change editing semantics.
  8. There is no second rendering path.

Platform architecture

  • Shared core: Rust crates implement text storage, syntax, editor state, decorations, layout, scene construction, rendering plans, assets, storage, workspaces, and export.
  • macOS: native Swift/AppKit shell, CoreText integration, Metal rendering, FSEvents, native menus, input, accessibility, and window lifecycle.
  • Windows: native Win32 shell built with Rust/windows-rs, DirectWrite text services, D3D11 rendering, TSF/IME input, DPI/theme handling, and native file lifecycle.
  • Linux: currently focused on validating the shared core.

Repository layout

crates/yu-core          shared coordinates, revisions, anchors
crates/yu-text          Rope, snapshots, transactions
crates/yu-syntax        incremental CST
crates/yu-markdown      Markdown semantics and extensions
crates/yu-state         editor state, history, facets
crates/yu-decoration    source ↔ visual projection
crates/yu-layout        line/widget layout, bidi, hit testing
crates/yu-scene         retained scene and damage tracking
crates/yu-render        backend-neutral render plans
crates/yu-assets        image/resource scheduling and caches
crates/yu-storage       Markdown sessions, atomic saves, file watching
crates/yu-workspace     tabs and document-session lifecycle
crates/yu-export        revision-bound clipboard and HTML export

platform/macos          native macOS shell, font, render, storage adapters
platform/windows        native Windows shell, packaging, installer
tools                   verification, inspection, benchmarks, release tooling

Development

Yu is pinned to Rust 1.98.1.

git clone https://github.com/xiaodou997/yu.git
cd yu

# Full verification
tools/verify.sh

# Rust-only checks
tools/verify.sh --rust-only

# macOS: build and launch the native app
platform/macos/yu-shell-macos/run-app.sh README.md

On Windows:

./platform/windows/yu-shell-windows/run-self-checks.ps1

For FFI changes on macOS, use a clean build to avoid stale SwiftPM artifacts:

platform/macos/yu-shell-macos/run-self-checks.sh --clean-build

Support and privacy

Contributing

Issues and pull requests are welcome. Changes to editor behavior should include behavioral tests; incremental algorithms should be checked against their full equivalents. Run the local verification suite before submitting platform or core changes.

License

Yu Markdown is open source under the Apache License 2.0.

About

Yu Markdown is an open-source, native, Markdown-first visual editor powered by Rust, delivering a fast, local-first Markdown writing experience on macOS and Windows.Yu Markdown 是一款开源、原生、Markdown-first 的所见即所得编辑器。以 Rust 构建共享编辑器内核,为 macOS 和 Windows 提供快速、本地优先的 Markdown 写作体验。

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages