# Installation

Add maccn to your GPUI project.

> For the complete documentation index, see [llms.txt](/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](/.well-known/agent-skills/site-skill.md).



## System Requirements [#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](https://github.com/longbridge/gpui-component).

### macOS [#macos]

* macOS 15 or later
* Xcode Command Line Tools

### Windows [#windows]

* Windows 10 or later
* Follow the [GPUI Windows setup guide](https://gpui.rs) for the required toolchain.

### Linux [#linux]

* A recent distribution with GTK and fontconfig development packages
* Follow the [GPUI Linux setup guide](https://gpui.rs) for system dependencies.

## Rust and Cargo [#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-maccn]

Add the following dependencies to your `Cargo.toml`:

```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 [#initialize-maccn]

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

```rust
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.
