astrid-runtime/astrid · error
Could not locate compiled WASM binary at `target/
Error message
Could not locate compiled WASM binary at `target/{target}/{PROFILE}/{wasm_name}.wasm` under configured target directory {} What it means
Fired by locate_wasm_binary when `target/<target>/release/<wasm_name>.wasm` does not exist under the configured target directory. There is deliberately no recursive search: probing other roots could pick stale artifacts.
Solutions
- Rebuild with the same target triple and target directory the build configures
- Check that CARGO_TARGET_DIR/configured target dir matches where the build ran
- Verify the wasm target component is installed and the build succeeded
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/astrid-build/src/rust.rs:614 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/394af43cac371373.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-build/src/rust.rs:614
/// profile. There is deliberately no recursive search or local-target
/// fallback: probing other roots could select stale artifacts when a
/// host-wide target root is configured.
fn locate_wasm_binary(
meta: &cargo_metadata::Metadata,
target: &str,
wasm_name: &str,
) -> Result<PathBuf> {
const PROFILE: &str = "release";
let target_root = meta.target_directory.as_std_path();
validate_wasm_output_name(wasm_name)?;
let candidate = target_root
.join(target)
.join(PROFILE)
.join(format!("{wasm_name}.wasm"));
let artifact_metadata = match fs::symlink_metadata(&candidate) {
Ok(metadata) => metadata,
Err(error) if error.kind() == std::io::ErrorKind::NotFound => bail!(
"Could not locate compiled WASM binary at `target/{target}/{PROFILE}/{wasm_name}.wasm` under configured target directory {}",
target_root.display()
),
Err(error) => {
return Err(error).with_context(|| {
format!(
"Failed to inspect compiled WASM binary {}",
candidate.display()
)
});
},
};
if artifact_metadata.file_type().is_symlink() {
bail!("Compiled WASM binary is a symlink: {}", candidate.display());
}
if !artifact_metadata.is_file() {
bail!(View on GitHub (pinned to affd8760f4)