Pumpkin-MC/Pumpkin · critical · PluginInitError

Engine creation failed

Error message

Engine creation failed: {0}

What it means

This is `PluginInitError::EngineCreationFailed`, wrapping a `wasmtime::Error`. The WASMTIME engine (the compiled-in runtime that executes plugin components) could not be created. Without an engine no plugin can be loaded, so it is usually a fatal environment problem.

Solutions

  1. Inspect the wrapped wasmtime::Error for the exact engine-config problem
  2. Fix the wasmtime Config (pooling limits, features) used to build the engine
  3. Verify the host CPU supports required features and you run a supported platform
  4. Try a Pumpkin build with a different/older wasmtime version if the engine cannot initialize
Defensive patterns

Strategy: try-catch

Try / catch

match init::create_engine(config) {
    Err(PluginInitError::EngineCreationFailed(e)) => {
        eprintln!("wasmtime engine unavailable: {e} — check Config and host CPU support");
    }
    other => other,
}

Prevention

When it happens

Trigger: Calling `Engine::new` (or `Engine::new(&config)`) with an invalid wasmtime `Config`, or on a CPU/host lacking required features (e.g. no 64-bit support, missing pooling config limits).

Common situations: Invalid pooling/allocation configuration values, unsupported hardware, broken wasmtime feature flags compiled into the server.

Related errors


AI-assisted analysis of Pumpkin-MC/Pumpkin@8d4639e25a (2026-09-09). Data as JSON: /api/errors/453ffd927ec335af. Report an issue: GitHub.

Appendix: source

Thrown at crates/pumpkin/src/plugin/loader/wasm/wasm_host/mod.rs:23

use wasmtime::{Cache, CacheConfig, Engine, component::Component, component::Linker};
use wasmtime_wasi::{FsPerms, WasiCtxBuilder, sockets::SocketAddrUse};

use crate::plugin::{
    Context, PluginMetadata, cache::calculate_hash_for_bytes,
    loader::wasm::wasm_host::state::PluginHostState, permissions,
};
use pumpkin_plugin_runtime::RuntimeSpawner;

pub mod args;
pub mod concurrent_store;
pub mod logging;
pub mod signature;
pub mod state;
pub mod wit;

#[derive(Error, Debug)]
pub enum PluginInitError {
    #[error("Engine creation failed: {0}")]
    EngineCreationFailed(wasmtime::Error),
    #[error("Failed to setup linker: {0}")]
    LinkerSetupFailed(wasmtime::Error),
    #[error("Plugin is built against a different API version: {0}")]
    ApiVersionMismatch(wasmtime::Error),
    #[error("Failed to read plugin file: {0}")]
    FileReadFailed(std::io::Error),
    #[error("Failed to load plugin as component: {0}")]
    ComponentNewFailed(wasmtime::Error),
    #[error("Failed to create cache data for plugin: {0}")]
    ComponentCacheSerializeFailed(wasmtime::Error),
    #[error("Failed to write cache file for plugin: {0}")]
    ComponentCacheWriteFailed(std::io::Error),
    #[error("Failed to instantiate plugin: {0}")]
    InstantiationFailed(wasmtime::Error),
    #[error("Calling `init_plugin` failed: {0}")]
    CallInitPluginFailed(wasmtime::Error),
    #[error("Calling `get_metadata` failed: {0}")]

View on GitHub (pinned to 8d4639e25a)