> For the complete documentation index, see [llms.txt](https://docs.aethercube.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aethercube.fr/developers/building-from-source/launcher.md). Agents can also search and read this documentation through its [MCP server](https://docs.aethercube.fr/~gitbook/mcp).

# Launcher

How to build and run the launcher from source. It is a Rust workspace in `game-launcher/`, built with Iced, Tokio and Reqwest. It signs the player in, manages profiles, installs and updates the client from a signed manifest, shows the server browser, and starts the client.

## Requirements

Rust 1.97.1, selected by `game-launcher/rust-toolchain.toml`. The Linux packages are the same as for the [client](https://docs.aethercube.fr/developers/building-from-source/client.md).

## Run against a local backend

Start the backend first. See [Backend](https://docs.aethercube.fr/developers/building-from-source/backend.md). Then:

```sh
cd game-launcher
cargo run -p launcher-app -- --home .cache/launcher --api-url http://127.0.0.1:8080
```

| Option            | Meaning                                                                                                                 |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `--home <dir>`    | Keep configuration, profiles, logs and games under one directory. Without it, the launcher uses the system directories. |
| `--api-url <url>` | Another backend. Plain `http` is accepted only on loopback addresses.                                                   |
| `--cdn-url <url>` | Another distribution source.                                                                                            |

With the `dev` feature (`cargo run -p launcher-app --features dev`), the launcher trusts the development manifest key and accepts plain `http` on loopback addresses. Published builds never have that feature.

The backend and distribution addresses of a build are fixed at compile time by `AETHERCUBE_API_URL` and `AETHERCUBE_CDN_URL`, so a local file cannot redirect a published launcher. Without them, a build targets `http://127.0.0.1:8080` and has no distribution source.

## Release build

```sh
cargo build --release --locked -p launcher-app -p launcher-bootstrap
```

Two binaries come out: `aethercube-launcher` (the application) and `aethercube-bootstrap` (the program players install: it downloads, updates and starts the launcher, and rolls back a version that does not start). They share one version. To try the whole flow on your machine, run the bootstrapper against a local CDN: `cargo run -p launcher-bootstrap --features dev -- --home .cache/launcher --cdn-url http://127.0.0.1:8081`. It passes `--home` and the other options it does not know on to the launcher.

## Installation layout

Each profile directory holds:

| Folder      | Content                                                                        |
| ----------- | ------------------------------------------------------------------------------ |
| `current/`  | The installed game.                                                            |
| `staging/`  | A version being prepared.                                                      |
| `backups/`  | The previous version.                                                          |
| `metadata/` | The installed record, the transaction journal, the lock and partial downloads. |

A new version is built and checked completely in `staging/`, then swapped in by renaming directories. If something interrupts an update, `current/` still works.

## Manifests

Manifests are signed with Ed25519. The launcher trusts only the public keys compiled into it. The signer is in `tools/manifest-signer/`.

## Tests

```sh
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo test --workspace --locked
```

`crates/launcher-core/tests/live_backend.rs` runs the whole authentication flow against a real backend when `AETHERCUBE_LIVE_API` is set:

```sh
AETHERCUBE_LIVE_API=http://127.0.0.1:8080 cargo test -p launcher-core --test live_backend
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.aethercube.fr/developers/building-from-source/launcher.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
