Launcher SDK
The SDK handles the part of a launcher that is easy to get nearly right: installing, updating and repairing a game on a player's disk, over a bad connection, without corrupting it.
Install
| Language | Package | Notes |
|---|---|---|
| C++17 | ashlane-launcher via CMake or vcpkg | Static or shared, no exceptions required |
| C# | Ashlane.Launcher on NuGet | .NET 8 and later, Unity 2022.3 and later |
| Rust | ashlane-launcher on crates.io | Async, tokio runtime |
Update an install
Planning and applying are separate calls so your launcher can show the download size and ask before it starts.
ashlane::Client c({.endpoint = "https://n74.assetlines.net", .title = "hollowmere"});
auto plan = c.plan_update(install_dir, "live");
if (plan.bytes_to_download > 0) {
c.apply(plan, [](const ashlane::Progress& p) {
ui::set_bar(p.bytes_done, p.bytes_total); // post-delta, post-compression
});
}var client = new AshlaneClient("https://n74.assetlines.net", "hollowmere");
var plan = await client.PlanUpdateAsync(installDir, "live");
if (plan.BytesToDownload > 0)
await client.ApplyAsync(plan, new Progress<AshProgress>(p =>
Ui.SetBar(p.BytesDone, p.BytesTotal)));let client = Client::new("https://n74.assetlines.net", "hollowmere")?;
let plan = client.plan_update(&install_dir, "live").await?;
if plan.bytes_to_download() > 0 {
client.apply(plan, |p| ui::set_bar(p.bytes_done, p.bytes_total)).await?;
}What the SDK guarantees
- Atomic updates. New files are written beside the old ones and swapped when every chunk verifies. A power cut mid-update leaves the previous version playable.
- Resumable downloads. Chunks are checked individually, so a resume continues at the next missing chunk, not at the start of a file.
- Verified installs. Every file is checked against the signed manifest.
verify()reads from disk only;repair()downloads just the chunks that do not match. - Polite bandwidth. Set a cap in bytes per second, or use
Throttle::Adaptiveto back off when other traffic on the link gets slow.
Settings you will probably change
| Option | Default | Meaning |
|---|---|---|
max_connections | 6 | Parallel HTTP/3 streams per site |
min_free_space | 1.2x download | Refuses to start below this |
keep_previous | false | Keeps the old version for rollback until the next launch |
channel | live | live, beta or internal |
New in 3.4.0: if the disk fills mid-install, the SDK pauses with
Error::DiskFull, keeps every verified chunk, and resumes once space is available.