clockworklabs/SpacetimeDB · error · anyhow::Error
The --features option is only supported for Rust modules.
Error message
The --features option is only supported for Rust modules.
What it means
Error "The --features option is only supported for Rust modules." thrown in clockworklabs/SpacetimeDB.
Source
Thrown at crates/cli/src/tasks/mod.rs:23
use self::cpp::build_cpp;
use self::csharp::build_csharp;
use self::javascript::build_javascript;
use self::rust::build_rust;
use duct::cmd;
// TODO: Replace the returned `&'static str` with a copy of `HostType` from core.
pub fn build(
project_path: &Path,
lint_dir: Option<&Path>,
build_debug: bool,
features: Option<&std::ffi::OsString>,
native_aot: bool,
dotnet_version: Option<u8>,
) -> anyhow::Result<(PathBuf, &'static str)> {
let lang = util::detect_module_language(project_path)?;
if features.is_some() && lang != ModuleLanguage::Rust {
anyhow::bail!("The --features option is only supported for Rust modules.");
}
let output_path = match lang {
ModuleLanguage::Rust => build_rust(project_path, features, lint_dir, build_debug),
ModuleLanguage::Csharp => build_csharp(project_path, build_debug, native_aot, dotnet_version),
ModuleLanguage::Javascript => build_javascript(project_path, build_debug),
ModuleLanguage::Cpp => build_cpp(project_path, build_debug),
}?;
if lang == ModuleLanguage::Javascript {
Ok((output_path, "Js"))
} else if build_debug {
Ok((output_path, "Wasm"))
} else {
// for release builds, optimize wasm modules with wasm-opt
let mut wasm_path = output_path;
eprintln!("Optimising module with wasm-opt...");
let wasm_path_opt = wasm_path.with_extension("opt.wasm");
match cmd!("wasm-opt", "-all", "-g", "-O2", &wasm_path, "-o", &wasm_path_opt).run() {View on GitHub (pinned to 524b4487d9)
When it happens
Trigger: Thrown at crates/cli/src/tasks/mod.rs:23 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/33815a83654439f1.
Report an issue: GitHub.