Skip to main content

Getting Started: Rust

Applies to

Get started with our official cross-platform Rust Crate.


To find the most accurate documentation for Rust please visit

  1. Add Velopack to your Cargo.toml:

    velopack = { version = "0.0", features = ["async"] }
    # Replace above with actual version and desired features
  2. Add the following code to your main() function:

    use velopack::*;
    fn main() {
    // VelopackApp should be the first thing to run.
    // In some circumstances it may terminate/restart
    // the process during update/install.

    // ... your other app startup code here
  3. Add auto-updates somewhere to your app:

    use velopack::*;
    use anyhow::Result;

    fn update_my_app() -> Result<()> {
    let source = sources::HttpSource::new("");
    let um = UpdateManager::new(source, None)?;

    // check for updates
    let updates: Option<UpdateInfo> = um.check_for_updates()?;
    if updates.is_none() {
    return Ok(()); // no updates available

    // download updates
    let updates = updates.unwrap();
    um.download_updates(&updates, |progress| {
    println!("Download progress: {}%", progress);

    // apply and restart
    um.apply_updates_and_restart(&updates, RestartArgs::None)?;
  4. Build your app with cargo:

    cargo build --release
  5. Install the vpk command line tool:

    dotnet tool update -g vpk

    You must have the .NET Core SDK 6 installed to use and update vpk

  6. Package your Velopack release / installers:

    vpk pack -u MyAppUniqueId -v 1.0.0 -p /target/release -e myexename.exe

✅ You're Done! Your app now has auto-updates and an installer. You can upload your release to your website, or use the vpk upload command to publish it to the destination of your choice.