astrid-runtime/astrid · error
Cargo completed without emitting the exact release cdylib…
Error message
Cargo completed without emitting the exact release cdylib artifact {expected_filename} What it means
Fired by compile_wasm_with_target when cargo exits successfully but no release artifact matching the expected cdylib filename is found in metadata. Cargo produced something other than the required WASM output.
Solutions
- Ensure the crate has a cdylib target whose name matches the expected filename
- Clean and rebuild `target/` to drop stale metadata
- Verify the configured target triple emits the expected artifact
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/astrid-build/src/rust.rs:307 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09).
Data as JSON: /api/errors/4eeabc9a0abc6cdf.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-build/src/rust.rs:307
);
}
let status = child.wait().context("Failed to wait for cargo build")?;
if !status.success() {
bail!(
"Cargo build failed. Set `[build] target = \"wasm32-unknown-unknown\"` (Astrid-canonical) or `wasm32-wasip2` in `.cargo/config.toml` and install the matching `rustup target` component."
);
}
artifacts.sort();
artifacts.dedup();
match artifacts.as_slice() {
[path] => Ok(CompiledWasm {
target,
path: path.clone(),
}),
[] => bail!(
"Cargo completed without emitting the exact release cdylib artifact {expected_filename}"
),
_ => bail!(
"Cargo emitted {} release cdylib artifacts named {expected_filename}; refusing to choose an ambiguous artifact",
artifacts.len()
),
}
}
fn inject_getrandom_for_target(target: &str) -> bool {
target == GETRANDOM_TARGET
}
/// Append the custom getrandom cfg without replacing any effective Cargo
/// rustflags. Cargo's precedence is encoded-rustflags env, plain rustflags env,
/// target-specific rustflags env, matching target config, then build
/// rustflags. We modify only the first effective environment source. When
/// config-derived flags are effective (including when `CARGO_BUILD_RUSTFLAGS`View on GitHub (pinned to affd8760f4)