wasmerio/wasmer · error

This CLI does not support the 'connect' command: only availa

Error message

This CLI does not support the 'connect' command: only available on Linux (feature: tun-tap)

What it means

The `wasmer connect` command (VPN/TUN-TAP networking) is only implemented for Linux when the `tun-tap` cargo feature is enabled. This unconditional error is the fallback `run_async` implementation compiled on all other platforms/feature configurations, so invoking `connect` there always fails with this message.

Source

Thrown at lib/cli/src/commands/connect.rs:105

    //            AppId::from_ip(&cidr.ip, NetworkIdEncodingMethod::PrivateProjection)
    //        {
    //            let ip = app_id.into_ip(
    //                cidr.ip,
    //                0x00_1001,
    //                NetworkIdEncodingMethod::PrivateProjection,
    //            );
    //            println!("Instance: {}/{}", ip, cidr.prefix);
    //        }
    //    }
    //    println!("Press ctrl-c to terminate");
    //    socket.await?;

    //    Ok(())
    //}

    //#[cfg(not(all(target_os = "linux", feature = "tun-tap")))]
    async fn run_async(self) -> Result<(), anyhow::Error> {
        Err(anyhow::anyhow!(
            "This CLI does not support the 'connect' command: only available on Linux (feature: tun-tap)"
        ))
    }
}

View on GitHub (pinned to 8c4b9ee9d3)

Solutions

  1. Run the command on Linux only; there is no cross-platform implementation.
  2. Install/build a wasmer CLI with the tun-tap feature: build with the appropriate feature flags enabled for Linux.
  3. Use an alternative networking mechanism (e.g. manual TUN setup or the platform-specific tooling) if you cannot rebuild.

Example fix

// before (macOS or feature-less build)
wasmer connect  // unsupported
// after (Linux, feature-enabled build)
cargo install wasmer-cli --features tun-tap
wasmer connect
Defensive patterns

Strategy: type-guard

Validate before calling

fn connect_supported() -> bool {
    cfg!(all(target_os = "linux", feature = "tun-tap"))
}
if !connect_supported() {
    eprintln!("connect requires Linux with the tun-tap feature; skipping");
}

Type guard

fn is_linux_with_tuntap() -> bool {
    cfg!(target_os = "linux") && cfg!(feature = "tun-tap")
}

Try / catch

match connect_cmd.run_async().await {
    Err(e) if e.to_string().contains("does not support the 'connect' command") => {
        eprintln!("Platform/feature unsupported; use a Linux tun-tap build");
    }
    other => other?,
}

Prevention

When it happens

Trigger: Running `wasmer connect` on a non-Linux OS (macOS, Windows), or on a Linux build of the wasmer CLI that was compiled without the `tun-tap` feature enabled.

Common situations: User reads docs describing the VPN `connect` feature and tries it on macOS/Windows; a distro/CI-installed wasmer binary built without tun-tap support; feature flags stripped in a release build.

Related errors


AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01). Data as JSON: /api/errors/652da06160670af0. Report an issue: GitHub.