ruvnet/RuView · error · anyhow::Error

plugin directories were configured, but homecore-server was

Error message

plugin directories were configured, but homecore-server was built without --features wasmtime

What it means

Anyhow bail in the plugin manager: config.directories is non-empty (WASM plugin directories were requested) but the binary was compiled without the `wasmtime` cargo feature, so load_wasm_plugins and the entire WASM runtime are absent. Native (compiled-in) plugins still load; only the directory-based WASM path is unavailable. The server refuses to start rather than silently ignoring configured directories.

Source

Thrown at v2/crates/homecore-server/src/plugins.rs:67

}

impl ServerPlugins {
    /// Start the complete plugin subsystem. Any configured package that fails
    /// discovery, trust verification, compilation, or setup aborts startup.
    pub async fn start(hc: HomeCore, config: PluginConfig) -> Result<Self> {
        let native = Arc::new(PluginRegistry::new(InProcessRuntime));
        for registration in NATIVE_PLUGINS {
            let (manifest, plugin) =
                (registration.create)().context("compiled-in native plugin factory failed")?;
            native
                .load(manifest, plugin, hc.clone())
                .await
                .context("compiled-in native plugin setup failed")?;
        }

        #[cfg(not(feature = "wasmtime"))]
        if !config.directories.is_empty() {
            anyhow::bail!(
                "plugin directories were configured, but homecore-server was built without \
                 --features wasmtime"
            );
        }
        #[cfg(not(feature = "wasmtime"))]
        if config.allow_unsigned || !config.trusted_publishers.is_empty() {
            anyhow::bail!(
                "plugin trust options were configured, but homecore-server was built without \
                 --features wasmtime"
            );
        }

        #[cfg(feature = "wasmtime")]
        let wasm = load_wasm_plugins(&hc, &config).await?;

        let mut receiver = hc.states().subscribe();
        let dispatch_native = native.clone();
        #[cfg(feature = "wasmtime")]

View on GitHub (pinned to 4685618388)

Solutions

  1. Rebuild with cargo build --release --features wasmtime (add to Dockerfile/CI)
  2. Or remove the plugin-directory entries from the config so the non-wasmtime build starts with native plugins only
  3. Keep build features and deployment config in one place (same Dockerfile/compose file) so they cannot drift

Example fix

# before
cargo build --release
# ./homecore-server --plugin-dir /etc/homecore/plugins
# error: plugin directories were configured, but built without --features wasmtime

# after
cargo build --release --features wasmtime
# ./homecore-server --plugin-dir /etc/homecore/plugins
Defensive patterns

Strategy: validation

Validate before calling

# preflight: only pass plugin dirs to binaries that support them
if [[ -n "$PLUGIN_DIR" ]] && ! homecore-server --version 2>/dev/null | grep -q wasmtime; then
  echo 'binary built without wasmtime; dropping --plugin-dir' >&2
  unset PLUGIN_DIR
fi

Prevention

When it happens

Trigger: Passing plugin-directory options to a homecore-server build without --features wasmtime; prebuilt/minimal binaries (default feature set) combined with a config that lists plugin dirs; CI artifacts that dropped optional features.

Common situations: Deployment config written for a full-featured build applied to a slim build; Docker images built from minimal feature sets; upgrading to a package that stopped enabling wasmtime by default.

Related errors


AI-assisted analysis of ruvnet/RuView@4685618388 (2026-08-16). Data as JSON: /api/errors/893e53eda0446841. Report an issue: GitHub.