astrid-runtime/astrid · error
Capsule.toml component declares both `file` and…
Error message
Capsule.toml component declares both `file` and `entrypoint`; refusing an ambiguous executable path
What it means
Manifest-binding guard in bind_manifest_to_packaged_wasm: the [components] table in Capsule.toml declares both `file` and `entrypoint` for the single component, making the executable path ambiguous. Since the build packages exactly one cdylib whose path is known, the manifest must identify it via exactly one key; both present means a contradictory user edit and packaging aborts.
Solutions
- Keep only `file` (preferred for packaged cdylibs) and delete `entrypoint`
- Or keep only `entrypoint` if that is your intended layout
- Rebuild after making the component path unambiguous
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/astrid-build/src/rust.rs:747 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/41d632c3f8d0460a.
Report an issue: GitHub.
Appendix: source
Thrown at crates/astrid-build/src/rust.rs:747
return Ok(());
};
let Some(components) = component_item.as_array_of_tables_mut() else {
bail!("Capsule.toml component must be an array of tables")
};
if components.len() != 1 {
bail!(
"Capsule.toml declares {} components, but this build packages exactly one cdylib",
components.len()
);
}
let component = components
.get_mut(0)
.context("Capsule.toml component array unexpectedly empty")?;
let has_file = component.get("file").is_some();
let has_entrypoint = component.get("entrypoint").is_some();
if has_file && has_entrypoint {
bail!(
"Capsule.toml component declares both `file` and `entrypoint`; refusing an ambiguous executable path"
);
}
let key = if has_file {
"file"
} else if has_entrypoint {
"entrypoint"
} else {
"file"
};
if let Some(item) = component.get(key)
&& item.as_str().is_none()
{
bail!("Capsule.toml component `{key}` must be a string")
}
component.insert(key, toml_edit::value(packaged_name));
Ok(())View on GitHub (pinned to affd8760f4)