{"record":{"id":"eec4500f25ff63f6","repo":"clockworklabs/SpacetimeDB","slug":"wasm-bindgen-detected-it-seems-like-either-you-o","errorCode":null,"errorMessage":"wasm-bindgen detected.\n\nIt seems like either you or a crate in your dependency tree is depending on\nwasm-bindgen. wasm-bindgen is only for webassembly modules that target the web\nplatform, and will not work in the context of SpacetimeDB.\n\nTo find the offending dependency, run `cargo tree -i wasm-bindgen`. Try checking\nits cargo features for 'js' or 'web' or 'wasm-bindgen' to see if there's a way\nto disable it.","messagePattern":"wasm-bindgen detected\\.\n\nIt seems like either you or a crate in your dependency tree is depending on\nwasm-bindgen\\. wasm-bindgen is only for webassembly modules that target the web\nplatform, and will not work in the context of SpacetimeDB\\.\n\nTo find the offending dependency, run `cargo tree -i wasm-bindgen`\\. Try checking\nits cargo features for 'js' or 'web' or 'wasm-bindgen' to see if there's a way\nto disable it\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/cli/src/tasks/rust.rs","lineNumber":120,"sourceCode":"    }\n    let artifact = artifact.context(\"no artifact found?\")?;\n    let artifact = artifact.filenames.into_iter().next().context(\"no wasm?\")?;\n\n    check_for_issues(artifact.as_ref())?;\n\n    Ok(artifact.into())\n}\n\nfn check_for_issues(artifact: &Path) -> anyhow::Result<()> {\n    // if this fails for some reason, just let it fail elsewhere\n    let Ok(file) = fs::File::open(artifact) else {\n        return Ok(());\n    };\n    let Ok(module) = wasmbin::Module::decode_from(&mut io::BufReader::new(file)) else {\n        return Ok(());\n    };\n    if has_wasm_bindgen(&module) {\n        anyhow::bail!(\n            \"wasm-bindgen detected.\\n\\\n             \\n\\\n             It seems like either you or a crate in your dependency tree is depending on\\n\\\n             wasm-bindgen. wasm-bindgen is only for webassembly modules that target the web\\n\\\n             platform, and will not work in the context of SpacetimeDB.\\n\\\n             \\n\\\n             To find the offending dependency, run `cargo tree -i wasm-bindgen`. Try checking\\n\\\n             its cargo features for 'js' or 'web' or 'wasm-bindgen' to see if there's a way\\n\\\n             to disable it.\"\n        )\n    }\n    if has_getrandom(&module) {\n        anyhow::bail!(\n            \"getrandom usage detected.\\n\\\n             \\n\\\n             It seems like either you or a crate in your dependency tree is depending on\\n\\\n             the `getrandom` crate for random number generation. getrandom is the default\\n\\\n             randomness source for the `rand` crate, and is used when you call\\n\\","sourceCodeStart":102,"sourceCodeEnd":138,"githubUrl":"https://github.com/clockworklabs/SpacetimeDB/blob/524b4487d949b61a07d4f39c862d1290259dfd20/crates/cli/src/tasks/rust.rs#L102-L138","documentation":"Error \"wasm-bindgen detected.\n\nIt seems like either you or a crate in your dependency tree is depending on\nwasm-bindgen. wasm-bindgen is only for webassembly modules that target the web\nplatform, and will not work in the context of SpacetimeDB.\n\nTo find the offending dependency, run `cargo tree -i wasm-bindgen`. Try checking\nits cargo features for 'js' or 'web' or 'wasm-bindgen' to see if there's a way\nto disable it.\" thrown in clockworklabs/SpacetimeDB.","triggerScenarios":"Thrown at crates/cli/src/tasks/rust.rs:120 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"524b4487d949b61a07d4f39c862d1290259dfd20","analyzedAt":"2026-08-16T23:58:54.611Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}