{"record":{"id":"453ffd927ec335af","repo":"Pumpkin-MC/Pumpkin","slug":"engine-creation-failed-0","errorCode":null,"errorMessage":"Engine creation failed: {0}","messagePattern":"Engine creation failed: (.+?)","errorType":"error_code","errorClass":"PluginInitError","httpStatus":null,"severity":"critical","filePath":"crates/pumpkin/src/plugin/loader/wasm/wasm_host/mod.rs","lineNumber":23,"sourceCode":"use wasmtime::{Cache, CacheConfig, Engine, component::Component, component::Linker};\nuse wasmtime_wasi::{FsPerms, WasiCtxBuilder, sockets::SocketAddrUse};\n\nuse crate::plugin::{\n    Context, PluginMetadata, cache::calculate_hash_for_bytes,\n    loader::wasm::wasm_host::state::PluginHostState, permissions,\n};\nuse pumpkin_plugin_runtime::RuntimeSpawner;\n\npub mod args;\npub mod concurrent_store;\npub mod logging;\npub mod signature;\npub mod state;\npub mod wit;\n\n#[derive(Error, Debug)]\npub enum PluginInitError {\n    #[error(\"Engine creation failed: {0}\")]\n    EngineCreationFailed(wasmtime::Error),\n    #[error(\"Failed to setup linker: {0}\")]\n    LinkerSetupFailed(wasmtime::Error),\n    #[error(\"Plugin is built against a different API version: {0}\")]\n    ApiVersionMismatch(wasmtime::Error),\n    #[error(\"Failed to read plugin file: {0}\")]\n    FileReadFailed(std::io::Error),\n    #[error(\"Failed to load plugin as component: {0}\")]\n    ComponentNewFailed(wasmtime::Error),\n    #[error(\"Failed to create cache data for plugin: {0}\")]\n    ComponentCacheSerializeFailed(wasmtime::Error),\n    #[error(\"Failed to write cache file for plugin: {0}\")]\n    ComponentCacheWriteFailed(std::io::Error),\n    #[error(\"Failed to instantiate plugin: {0}\")]\n    InstantiationFailed(wasmtime::Error),\n    #[error(\"Calling `init_plugin` failed: {0}\")]\n    CallInitPluginFailed(wasmtime::Error),\n    #[error(\"Calling `get_metadata` failed: {0}\")]","sourceCodeStart":5,"sourceCodeEnd":41,"githubUrl":"https://github.com/Pumpkin-MC/Pumpkin/blob/8d4639e25a57c15e47448ec327c780d41bbf2356/crates/pumpkin/src/plugin/loader/wasm/wasm_host/mod.rs#L5-L41","documentation":"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.","triggerScenarios":"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).","commonSituations":"Invalid pooling/allocation configuration values, unsupported hardware, broken wasmtime feature flags compiled into the server.","solutions":["Inspect the wrapped wasmtime::Error for the exact engine-config problem","Fix the wasmtime Config (pooling limits, features) used to build the engine","Verify the host CPU supports required features and you run a supported platform","Try a Pumpkin build with a different/older wasmtime version if the engine cannot initialize"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"match init::create_engine(config) {\n    Err(PluginInitError::EngineCreationFailed(e)) => {\n        eprintln!(\"wasmtime engine unavailable: {e} — check Config and host CPU support\");\n    }\n    other => other,\n}","preventionTips":["Use default or well-tested wasmtime Config values","Deploy on supported 64-bit platforms with required CPU features","Keep wasmtime and Pumpkin builds in sync"],"tags":["wasmtime","engine","wasm","initialization"],"backgroundTag":"module-init-failed","analyzedSha":"8d4639e25a57c15e47448ec327c780d41bbf2356","analyzedAt":"2026-09-09T15:32:22.916Z","contentChangedAt":"2026-09-09T15:32:22.916Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}