clockworklabs/SpacetimeDB · error · anyhow::Error
wasm-bindgen detected. It seems like either you or a crate
Error message
wasm-bindgen detected. It seems like either you or a crate in your dependency tree is depending on wasm-bindgen. wasm-bindgen is only for webassembly modules that target the web platform, and will not work in the context of SpacetimeDB. To find the offending dependency, run `cargo tree -i wasm-bindgen`. Try checking its cargo features for 'js' or 'web' or 'wasm-bindgen' to see if there's a way to disable it.
What it means
Error "wasm-bindgen detected. It seems like either you or a crate in your dependency tree is depending on wasm-bindgen. wasm-bindgen is only for webassembly modules that target the web platform, and will not work in the context of SpacetimeDB. To find the offending dependency, run `cargo tree -i wasm-bindgen`. Try checking its cargo features for 'js' or 'web' or 'wasm-bindgen' to see if there's a way to disable it." thrown in clockworklabs/SpacetimeDB.
Source
Thrown at crates/cli/src/tasks/rust.rs:120
}
let artifact = artifact.context("no artifact found?")?;
let artifact = artifact.filenames.into_iter().next().context("no wasm?")?;
check_for_issues(artifact.as_ref())?;
Ok(artifact.into())
}
fn check_for_issues(artifact: &Path) -> anyhow::Result<()> {
// if this fails for some reason, just let it fail elsewhere
let Ok(file) = fs::File::open(artifact) else {
return Ok(());
};
let Ok(module) = wasmbin::Module::decode_from(&mut io::BufReader::new(file)) else {
return Ok(());
};
if has_wasm_bindgen(&module) {
anyhow::bail!(
"wasm-bindgen detected.\n\
\n\
It seems like either you or a crate in your dependency tree is depending on\n\
wasm-bindgen. wasm-bindgen is only for webassembly modules that target the web\n\
platform, and will not work in the context of SpacetimeDB.\n\
\n\
To find the offending dependency, run `cargo tree -i wasm-bindgen`. Try checking\n\
its cargo features for 'js' or 'web' or 'wasm-bindgen' to see if there's a way\n\
to disable it."
)
}
if has_getrandom(&module) {
anyhow::bail!(
"getrandom usage detected.\n\
\n\
It seems like either you or a crate in your dependency tree is depending on\n\
the `getrandom` crate for random number generation. getrandom is the default\n\
randomness source for the `rand` crate, and is used when you call\n\View on GitHub (pinned to 524b4487d9)
When it happens
Trigger: Thrown at crates/cli/src/tasks/rust.rs:120 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of clockworklabs/SpacetimeDB@524b4487d9 (2026-08-16).
Data as JSON: /api/errors/eec4500f25ff63f6.
Report an issue: GitHub.