For the complete documentation index, see llms.txt. Markdown variants are available by appending .md to any URL or sending an Accept: text/markdown header. An agent skill is available at /.well-known/agent-skills/site-skill.md.
/
3
Sponsor

Installation

Add maccn to your GPUI project.

System Requirements

maccn runs anywhere GPUI runs. Development is supported on macOS, Windows, and Linux.

For the latest platform setup steps, see the gpui-component repository.

macOS

  • macOS 15 or later
  • Xcode Command Line Tools

Windows

Linux

  • A recent distribution with GTK and fontconfig development packages
  • Follow the GPUI Linux setup guide for system dependencies.

Rust and Cargo

maccn is a Rust library. Make sure you have Rust and Cargo installed:

  • Rust 1.85 or later
  • Cargo (comes with Rust)

Add maccn

Add the following dependencies to your Cargo.toml:

[dependencies]
maccn = { git = "https://github.com/shadcn-labs/maccn" }
gpui = { git = "https://github.com/zed-industries/zed" }
gpui_platform = { git = "https://github.com/zed-industries/zed", features = ["font-kit"] }

Initialize maccn

Call maccn::init inside your application startup closure, before opening any windows:

fn main() {
    gpui_platform::application().run(move |cx: &mut App| {
        maccn::init(cx);
 
        cx.open_window(WindowOptions::default(), |_, cx| {
            cx.new(|_| HelloWorld)
        })
        .expect("Failed to open window");
    });
}

This registers the global MaccnTheme and gpui-base infrastructure. Components will not render correctly without it.