Skip to content

Building from source

Simdrom edited this page Nov 27, 2026 · 1 revision

Building from source

Requirements

  • Windows with the MSVC toolchain (Visual Studio Build Tools, "Desktop development with C++").
  • Rust stable, through rustup. The repository's rust-toolchain.toml selects stable with rustfmt and clippy. The oldest supported version is the rust-version in the root Cargo.toml (1.95 today), and CI checks it.

Nothing else is needed to browse and keep a local list.

Running

cargo run --release -p kuro

A debug build (cargo run -p kuro) has a console, so logs can be read there:

$env:RUST_LOG = "kuro_app=info,kuro_api=info"; cargo run -p kuro

Release builds are windowed and have no console.

Signing in with your own build

Released builds have AniList and MyAnimeList client IDs built in. A build of your own needs a client ID for each service. Create one (free) with this redirect URL, then paste it in Settings › Accounts:

Service Page Redirect URL
AniList https://anilist.co/settings/developer http://127.0.0.1:42813/anilist
MyAnimeList (app type "other") https://myanimelist.net/apiconfig http://127.0.0.1:42813/mal

To build them in, set these when compiling; Settings then hides the client ID fields:

Variable What it is
KURO_ANILIST_CLIENT_ID AniList client ID
KURO_MAL_CLIENT_ID MyAnimeList client ID
KURO_GOOGLE_CLIENT_ID Google OAuth client of type "Desktop app"
KURO_GOOGLE_CLIENT_SECRET Its secret (Google treats it as public for desktop apps)

Google Calendar only works when it is built in. No client secret is used for AniList or MyAnimeList.

A separate profile

KURO_PROFILE_DIR=<folder> keeps lists, settings and caches in that folder instead of %LOCALAPPDATA%\Kuro. Handy for testing without touching your real list.

Building the setup

The setup carries the program and its licences inside. packaging/windows/build.ps1 builds both into dist\. By hand:

cargo build --release --locked -p kuro
mkdir out; copy target\release\kuro.exe out
cargo about generate --locked --fail -o out\THIRD-PARTY-LICENSES.html about.hbs
$env:KURO_PAYLOAD = "$PWD\out"
cargo build --release --locked -p kuro-setup

Without KURO_PAYLOAD, kuro-setup builds with an empty payload, which is enough for checks and tests. cargo about is installed with cargo install cargo-about --locked.

Two more variables exist only to test moving between versions: KURO_SETUP_VERSION makes the setup claim another version, and KURO_SETUP_SCHEMA another list format.

The release profile

Setting Why
lto = "thin", codegen-units = 1 A smaller, faster program
strip = true No symbols in the published files
overflow-checks = true Arithmetic overflow stops the program instead of going unnoticed
miniz_oxide at opt-level = 3 The setup's build script compresses Kuro; unoptimised it takes minutes
+crt-static (in .cargo/config.toml) Runs on a clean Windows without the Visual C++ runtime

In debug builds, dependencies are compiled at opt-level = 2 so the interface stays smooth.

Checks before a pull request

cargo fmt --all
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace

More in Contributing.

Clone this wiki locally