wasmerio/wasmer · error

failed to move unpacked wee8 lib from {} to {}: {err}

Error message

failed to move unpacked wee8 lib from {} to {}: {err}

What it means

Error "failed to move unpacked wee8 lib from {} to {}: {err}" thrown in wasmerio/wasmer.

Source

Thrown at lib/api/build.rs:141

        if !staged_lib.is_dir() {
            let _ = fs::remove_file(&archive_path);
            panic!(
                "v8 archive {} did not contain a top-level `lib/` directory after unpack (expected {})",
                archive_path.display(),
                staged_lib.display()
            );
        }
        if v8_lib_dir.exists() {
            fs::remove_dir_all(&v8_lib_dir).unwrap_or_else(|err| {
                panic!(
                    "failed to remove existing wee8 lib dir {} before rename: {err}",
                    v8_lib_dir.display()
                )
            });
        }
        fs::rename(&staged_lib, &v8_lib_dir).unwrap_or_else(|err| {
            let _ = fs::remove_file(&archive_path);
            panic!(
                "failed to move unpacked wee8 lib from {} to {}: {err}",
                staged_lib.display(),
                v8_lib_dir.display()
            )
        });
    }

    println!("cargo:rustc-link-search=native={}", v8_lib_dir.display());

    if cfg!(any(target_os = "linux",)) {
        println!("cargo:rustc-link-lib=stdc++");
    } else if cfg!(target_os = "windows") {
        println!("cargo:rustc-link-lib=winmm");
        println!("cargo:rustc-link-lib=dbghelp");
        println!("cargo:rustc-link-lib=shlwapi");
    } else {
        println!("cargo:rustc-link-lib=c++");
    }

View on GitHub (pinned to 8c4b9ee9d3)

When it happens

Trigger: Thrown at lib/api/build.rs:141 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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