Prerequisites
Before building the launcher, ensure you have the following dependencies installed on your system.System Requirements
Rust Toolchain
Rust Toolchain
Required: Rust stable toolchain (edition 2021)Install via rustup:Verify installation:
Build Tools
Build Tools
Required build dependencies:Fedora:Arch Linux:
gcc- C compilercmake- Build system generatorpkg-config- Dependency metadata toolgit- Version control
GTK4 Development Libraries
GTK4 Development Libraries
Required GTK dependencies:Fedora:Arch Linux:
gtk4(>= 4.16)libadwaita(>= 1.5)glib2gdk-pixbuf2gobject-introspection
Additional Dependencies
Additional Dependencies
Optional but recommended:
unzip- Archive extractionp7zip- 7z archive supportlibwebp- WebP image supportprotobuf- Protocol buffers
Building the Launcher
Standard Build
Build with Cargo
Debug build (faster compilation, includes debug symbols):Release build (optimized for size and performance):
Release builds are significantly smaller and faster due to:
- Link-time optimization (LTO)
- Symbol stripping
- Size optimization (
opt-level = "s")
Development Build
For active development with faster iteration:Build with Nix
If you use NixOS or Nix package manager, a flake is provided:Enter development shell
The flake provides a complete development environment:This automatically provides:
- Rust toolchain with
rust-srcextension - All GTK4 and libadwaita dependencies
- Build tools (gcc, cmake, pkg-config)
- Development utilities (git, unzip, p7zip, libwebp)
The Nix flake uses binary caches from:
cache.nixos.org- Official NixOS cachenix-community.cachix.org- Community packagesan-anime-team.cachix.org- Project-specific cache
Command Line Arguments
The launcher supports several CLI arguments:Build Artifacts
After building, you’ll find:Binary Size Comparison
| Build Type | Typical Size | Optimization |
|---|---|---|
| Debug | ~50-100 MB | None, includes symbols |
| Release | ~15-25 MB | LTO + strip + size opt |
Development with anime-launcher-sdk
The launcher depends onanime-launcher-sdk. For SDK development:
Resource Compilation
GTK resources are automatically compiled during build viabuild.rs:
- UI definition files
- Icons and images
- Localization files (
assets/locales/) - Application metadata
Troubleshooting
GTK/libadwaita version errors
GTK/libadwaita version errors
Ensure you have GTK4 >= 4.16 and libadwaita >= 1.5:If versions are too old, you may need to use a newer distribution version or build from source.
Missing glib-build-tools
Missing glib-build-tools
If you see errors about The build dependency should be automatically fetched.
glib-build-tools:Linker errors
Linker errors
If you encounter linker errors about missing symbols:
- Verify all GTK development packages are installed
- Check
pkg-configcan find them: - Try a clean rebuild:
Resource compilation errors
Resource compilation errors
If
glib-compile-resources fails:- Ensure
glib2development tools are installed - Check
assets/resources.xmlis valid - Verify all referenced files exist in
assets/
Next Steps
Once you have successfully built the launcher:Architecture
Understand the codebase structure and design patterns
Contributing
Learn how to contribute to the project