wasmerio/wasmer · error
The package doesn't contain any executable commands
Error message
The package doesn't contain any executable commands
What it means
This error comes from BinaryPackage::infer_entrypoint when a webc package is being executed but its command manifest contains zero commands. The library cannot pick a default executable to run, so it aborts with 'The package doesn't contain any executable commands'. It is thrown during execute_webc -> infer_entrypoint before any WASM is instantiated.
Source
Thrown at lib/wasix/src/bin_factory/binary_package.rs:334
///
/// Usually the hash of the entrypoint.
pub fn hash(&self) -> ModuleHash {
*self.hash.get_or_init(|| {
if let Some(cmd) = self.get_entrypoint_command() {
cmd.hash
} else {
ModuleHash::new(self.id.to_string())
}
})
}
pub fn infer_entrypoint(&self) -> Result<&str, anyhow::Error> {
if let Some(entrypoint) = self.entrypoint_cmd.as_deref() {
return Ok(entrypoint);
}
match self.commands.as_slice() {
[] => anyhow::bail!("The package doesn't contain any executable commands"),
[one] => Ok(one.name()),
[..] => {
let mut commands: Vec<_> = self.commands.iter().map(|cmd| cmd.name()).collect();
commands.sort();
anyhow::bail!(
"Unable to determine the package's entrypoint. Please choose one of {commands:?}"
);
}
}
}
}
#[cfg(test)]
mod tests {
use sha2::Digest;
use tempfile::TempDir;
use virtual_fs::AsyncReadExt;
use wasmer_package::utils::from_disk;View on GitHub (pinned to 8c4b9ee9d3)
Solutions
- Rebuild the webc package with at least one command entry (e.g. `wapc`/`packaged` manifest including a `[[command]]` pointing at a module).
- Set the entrypoint explicitly where supported (entrypoint_cmd / --entrypoint flag) if the package intentionally has no default.
- Verify you are running the correct webc file — pick one that actually contains a CLI command, not a data/library package.
Example fix
// before (empty command manifest) // webc has no [[command]] sections -> infer_entrypoint() bails // after // wapm.toml: // [package] // name = "my/cli" // [[module]] // name = "app" // source = "target/wasm32-wasi/release/app.wasm" // [[command]] // name = "app" // module = "app"
Defensive patterns
Strategy: validation
Validate before calling
// Rust: check the package before executing
if pkg.commands.is_empty() {
return Err(anyhow::anyhow!(
"package '{}' has no executable commands; rebuild the webc with a [[command]] entry",
pkg.name
));
} Type guard
fn has_entrypoint(pkg: &BinaryPackage) -> bool {
pkg.entrypoint_cmd.is_some() || !pkg.commands.is_empty()
} Prevention
- Always include at least one [[command]] in the wapm/webc manifest when building CLI packages.
- Set the entrypoint explicitly for multi-purpose or data packages.
- CI-check packaged webc files for a non-empty command list before publishing.
When it happens
Trigger: Calling execute_webc (or run/pacakge-level APIs that resolve an entrypoint) on a package whose `commands` list is empty and which has no explicit `entrypoint_cmd` set.
Common situations: Building a webc from a container image or data-only package (e.g. assets/shared libraries) with no `[[bin]]`/command entries; packaging tools producing empty manifests; pointing waken at a shared-library webc instead of a CLI webc.
Related errors
- Unable to determine the package's entrypoint. Please choose
- Internal error: failed to resolve exported function {}: {e:?
- Internal error: Tried to import TLS symbol from module {} th
- Internal error: missing import resolution '{0}'.{1}
- Internal error: bad in-progress symbol resolution: {e:?}
AI-assisted analysis of wasmerio/wasmer@8c4b9ee9d3 (2026-09-01).
Data as JSON: /api/errors/f5ef0f45c4884661.
Report an issue: GitHub.