wasmerio/wasmer · error
Self update is not supported on Windows. Use install instruc
Error message
Self update is not supported on Windows. Use install instructions on the Wasmer homepage: https://wasmer.io
What it means
The `wasmer self-update` command refuses to run on Windows. Self-updating via binary replacement is only implemented for Unix-like targets, so the Windows-specific `inner_execute` unconditionally aborts with `anyhow::bail!` and points users to the official install instructions at https://wasmer.io. It is a deliberate platform limitation, not a runtime failure.
Source
Thrown at lib/cli/src/commands/self_update.rs:35
println!("Fetching latest installer");
let cmd = Command::new("curl")
.arg("https://get.wasmer.io")
.arg("-sSfL")
.stdout(Stdio::piped())
.spawn()?;
let mut process = Command::new("sh")
.stdin(cmd.stdout.unwrap())
.stdout(Stdio::inherit())
.spawn()?;
process.wait().unwrap();
Ok(())
}
#[cfg(target_os = "windows")]
fn inner_execute(&self) -> Result<(), anyhow::Error> {
anyhow::bail!(
"Self update is not supported on Windows. Use install instructions on the Wasmer homepage: https://wasmer.io"
);
}
}
View on GitHub (pinned to 8c4b9ee9d3)
Solutions
- Upgrade via the Windows installer from https://wasmer.io instead of `wasmer self-update`
- Use the package manager that installed it (e.g. `winget upgrade Wasmer.Wasmer` or `scoop update wasmer`)
- Guard automation scripts: only call `wasmer self-update` when cfg!(target_os = "windows") is false
Example fix
// before (CI script) wasmer self-update || exit 1 // after (shell) if ! uname -s | grep -qi mingw; then wasmer self-update; fi
Defensive patterns
Strategy: validation
Validate before calling
if cfg!(target_os = "windows") {
eprintln!("self-update unsupported on Windows; install from https://wasmer.io");
return;
}
wasmer_cli::commands::self_update::SelfUpdate::new().execute()?; Type guard
fn can_self_update() -> bool {
!cfg!(target_os = "windows")
} Prevention
- Branch upgrade logic on OS before invoking self-update
- On Windows use winget/scoop or the installer for upgrades
- Pin CLI versions in CI and update them via package management, not self-update
When it happens
Trigger: Running `wasmer self-update` (SelfUpdate::execute -> inner_execute) on any Windows build of the CLI. The #[cfg(target_os = "windows")] variant always bails; no other condition matters.
Common situations: Windows users installing Wasmer via scoop/winget/installer and later trying to upgrade in place with the CLI; CI scripts written for Linux/macOS that unconditionally run `wasmer self-update`.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- Unable to determine the wasmer dir: {e}
- state::get_inode_at_path unknown file type: not file, direct
- wasi::platform_clock_time_get(wasi::Clockid::ProcessCputimeI
- wasi::platform_clock_time_get(wasi::Clockid::ThreadCputimeId
- --experimental-artifact is only supported on Linux
AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01).
Data as JSON: /api/errors/7f1838041f84e1e0.
Report an issue: GitHub.