Skip to content

kumarUjjawal/aster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aster logo

Aster

Aster is a Markdown editor built in Rust on top of GPUI, the GPU-accelerated UI framework from the Zed team. It focuses on a fast inline-editing experience with rope-backed text operations and background markdown span parsing. Why am I using Rope data structure? Because it is fast and provides several benefits over the regular String. If you want to learn more, check out this brilliant article by the Zed team: Rope & SumTree. Zed uses their own version of Rope which isn't really a rope but a SumTree. Currently, I am using the regular Rope and if there are needs, I might switch to the Zed version. Why gpui? Because it's GPU accelerated (Metal on macOS) and it provides precise control over the layout, saving us from the hell that is virtual DOM.

Aster Screenshot


Download

Pre-built macOS applications are available for direct download:

Architecture Download
Apple Silicon (M1/M2/M3/M4) Aster-arm64.dmg
Intel (Core i5/i7/i9) Aster-x86_64.dmg

Installation

  1. Download the .dmg file for your Mac's architecture
  2. Double-click the DMG to mount it
  3. Drag Aster.app to your Applications folder
  4. Eject the DMG

Note: On first launch, you may need to right-click → Open to bypass Gatekeeper (the app is not notarized yet).


Highlights

  • Native macOS windowing with Metal rendering via GPUI
  • Rope-backed text model (ropey) for fast inserts/deletes
  • Live Markdown parse and render (CommonMark + GFM extensions)
  • Inline markdown rendering in the editor with background span parsing
  • Support for tables, footnotes, strikethrough, and task lists
  • Document outline in the sidebar (click any heading to jump in editor)
  • Lightweight Markdown syntax highlighting in the editor
  • In-editor Find with match navigation (Cmd+F, Cmd+G, Shift+Cmd+G)
  • Image loading (local)
  • Atomic file saves with dirty-state tracking; open/save dialogs via rfd

Keyboard Shortcuts

File

  • Cmd+N: New file
  • Cmd+O: Open file
  • Cmd+S: Save
  • Shift+Cmd+S: Save As
  • Cmd+W: Close window
  • Cmd+Q: Quit

Edit

  • Cmd+Z: Undo
  • Shift+Cmd+Z / Cmd+Y: Redo
  • Cmd+X: Cut
  • Cmd+C: Copy
  • Cmd+V: Paste
  • Cmd+A: Select all

Search

  • Cmd+F: Open Find
  • Cmd+G: Find next match
  • Shift+Cmd+G: Find previous match

View

  • Cmd+=: Increase font size
  • Cmd+-: Decrease font size
  • Cmd+0: Reset font size

Building from Source

Requirements

Requirement Details
macOS 11.0 (Big Sur) or later
Xcode Command Line Tools xcode-select --install
Rust (Nightly) Edition 2024 requires nightly toolchain

Step 1: Install Rust (if not already installed)

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

Step 2: Run Aster

cargo run

Step 3: Open a file on launch (optional)

Open a file on launch:

cargo run -- path/to/file.md

Step 4: Build a macOS .app bundle (optional)

Install cargo-bundle:

cargo install cargo-bundle

Build the app bundle:

cargo bundle --release

The .app will be created at target/release/bundle/osx/Aster.app.


Cross-Architecture Builds

Using the Build Script (Recommended)

The easiest way to create distributable DMG files:

# Build for your current architecture
./scripts/build-dmg.sh

# Build specifically for Apple Silicon
./scripts/build-dmg.sh arm64

# Build specifically for Intel
./scripts/build-dmg.sh x86_64

# Build universal binary (both architectures)
./scripts/build-dmg.sh universal

The DMG files will be created in the project root directory.

Manual Build

For Apple Silicon (M1/M2/M3/M4):

rustup target add aarch64-apple-darwin
cargo bundle --release --target aarch64-apple-darwin

For Intel Macs:

rustup target add x86_64-apple-darwin
cargo bundle --release --target x86_64-apple-darwin

Architecture (brief)

  • src/app.rs / src/main.rs: window bootstrap, logging
  • src/model/: DocumentState (rope, cursor, dirty tracking), InlineMarkdownState (background span snapshots)
  • src/services/: inline syntax span parsing and file I/O helpers
  • src/ui/: editor view (rope-backed input + inline render), outline sidebar, root layout
  • src/ui/theme.rs: light palette and typography tokens

Current Status

  • Single-pane inline editing renders headings, emphasis, code, lists, and links directly in the editor
  • Light theme applied across editor and sidebar panels
  • Keyboard shortcuts for file, edit, view, and search workflows
  • Outline sidebar with clickable heading navigation
  • Lightweight syntax highlighting in the editor for Markdown structure
  • In-editor find flow with next/previous navigation
  • Image rendering (local)
  • Footnotes support with navigation

License

MIT License - see LICENSE for details.

About

Markdown Editor and Viewer Written in Rust & GPUI

Resources

Stars

Watchers

Forks

Packages