# Platforms and requirements

> What each platform needs and what behaves differently on Linux, Windows, macOS and Nix.

Kurogane installs and finds the Chromium runtime itself. Each platform needs a few system tools. [Install](https://kurogane-rs.org/docs/start/install.md#what-else-you-need) lists them. This page collects what is specific to each platform.

| Platform | Architectures | Minimum OS | Formats |
|---|---|---|---|
| Linux (glibc) | x86_64, aarch64 | glibc 2.31 (Ubuntu 20.04, Debian 11) | directory, AppImage |
| Windows | x86_64, ARM64 | Windows 10 | directory, NSIS installer |
| macOS | Apple Silicon, Intel | macOS 12 | `.app` and `.dmg` |

## Linux

Install a C compiler and Chromium's libraries. Nothing else needs setting up.

* **glibc.** An app needs at least the glibc of the machine that built it. Build Linux bundles on the oldest distribution you support. musl systems such as Alpine can run the CLI but not apps.
* **Window class.** Windows take the executable's name as their class unless [`App::window_class`](https://kurogane-rs.org/docs/api/app/app.md#method.window_class) sets one. An AppImage's desktop entry declares the same class.
* **Wayland.** Chromium windows run natively in a Wayland session. Embedded browsers run Chromium on X11 through XWayland. With an NVIDIA GPU Chromium runs on X11 too.
* **Sandbox.** It needs unprivileged user namespaces or a setuid `chrome-sandbox`. Ubuntu 24.04 restricts namespaces through AppArmor. See [Sandbox](https://kurogane-rs.org/docs/concepts/sandbox.md#linux).
* **GPU report.** `kurogane doctor` reads OpenGL details through `glxinfo`. Install `mesa-utils` for that report on Debian and Ubuntu.
* **Signing.** Linux bundles aren't signed.

## Windows

Install the Visual Studio C++ Build Tools with the **Desktop development with C++** workload. It includes the Windows SDK. Nothing is compiled from C++ and nothing links Chromium. The Build Tools give Rust its linker.

`kurogane dev`, `run` and `bundle` work from any terminal.

* **Application manifest.** Your app's `build.rs` calls `kurogane_build::build()` to embed the manifest CEF's own executables carry. Without it Windows tells your app and Chromium they run on Windows 8.
* **Sandbox.** CEF's bootstrap starts a sandboxed app and loads it as a library. That takes a library target and `sandbox = true`. See [Sandbox](https://kurogane-rs.org/docs/concepts/sandbox.md#windows).
* **GPU.** Without the sandbox GPU work runs inside the browser process. See [GPU mode](https://kurogane-rs.org/docs/guides/gpu-mode.md#hardware-on-each-platform).
* **Signing.** `--sign` signs every `.exe` and `.dll` and the installer. See [Code signing](https://kurogane-rs.org/docs/shipping/signing.md#sign-on-windows).

## macOS

Install the Xcode Command Line Tools:

```bash
xcode-select --install
```

`hdiutil` and `sips` ship with macOS. `--sign` needs `codesign` from the Command Line Tools.

* **Menus.** Every app gets the standard App, Edit and Window menus. A winit app keeps them with `with_default_menu(false)`. See [Drive Chromium from winit](https://kurogane-rs.org/docs/embedding/winit.md#keep-the-edit-menu-on-macos).
* **Privacy declarations.** Every app declares camera and microphone use with a reason macOS shows when a page asks. `[macos.privacy]` sets your own.
* **Minimum version.** Apps run on macOS 12 and later, the oldest CEF supports. `[macos] minimum-system-version` raises it.
* **Sandbox.** It needs the app to run from a `.app` bundle. An unbundled `kurogane dev` run refuses `SandboxMode::Chromium`.
* **Keychain.** An unsigned build raises a Keychain prompt on every run. Signing ends it. See [Credential storage](https://kurogane-rs.org/docs/guides/credential-storage.md).
* **Signing.** `--sign` signs the app inside out and its disk image. Kurogane doesn't notarize. See [Code signing](https://kurogane-rs.org/docs/shipping/signing.md#sign-on-macos).
* **Formats.** `--format app` is the default. `--format dir` isn't a macOS format and is refused.

## Nix and NixOS

Kurogane has a Nix flake for installing the CLI and for developing Kurogane itself. Nix is optional.

| Command | Purpose |
|---|---|
| `inputs.kurogane` in a system flake | installs Kurogane with your NixOS or Home Manager configuration |
| `nix profile add github:0x48piraj/kurogane` | installs the CLI into your user profile |
| `nix run github:0x48piraj/kurogane` | runs the CLI without installing it |
| `nix develop github:0x48piraj/kurogane` | opens a shell to develop Kurogane itself |

[Install](https://kurogane-rs.org/docs/start/install.md#nix-and-nixos) covers the first three, which nixpkgs to follow and GPU drivers.

The packaged CLI carries the Chromium runtime with its license, credits and `archive.json`. Its `CEF_PATH` names it. `kurogane run` and `kurogane bundle` use it. No separate CEF installation is needed.

Your app needn't be Nix-native because you install Kurogane with Nix. It stays a normal Rust and Cargo project.

### Develop Kurogane with Nix

`nix develop` opens a shell with Rust, CEF and the native libraries for building Kurogane from source:

```bash
nix develop github:0x48piraj/kurogane
cargo build
cargo test
```

It doesn't put the packaged CLI on your `PATH`. On `nixos-unstable` open it on your system's nixpkgs so apps built in it load your GPU drivers:

```bash
nix develop github:0x48piraj/kurogane --override-input nixpkgs nixpkgs
```

> [!NOTE]
> `nix develop` fails when the project's path contains spaces, such as `/home/user/My Projects/kurogane`. That's a known Nix issue ([NixOS/nix#12413](https://github.com/NixOS/nix/issues/12413)). Move the project to a path without spaces.
