{"record":{"id":"fdfccca93407e79a","repo":"FyroxEngine/Fyrox","slug":"unsupported-platform","errorCode":null,"errorMessage":"Unsupported platform!","messagePattern":"Unsupported platform!","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"fyrox-impl/src/plugin/dylib.rs","lineNumber":78,"sourceCode":"        P: libloading::AsFilename,\n    {\n        #[cfg(any(unix, windows))]\n        unsafe {\n            let lib = libloading::Library::new(path).map_err(|e| e.to_string())?;\n\n            let entry = lib\n                .get::<PluginEntryPoint>(\"fyrox_plugin\".as_bytes())\n                .map_err(|e| e.to_string())?;\n\n            Ok(Self {\n                plugin: entry(),\n                lib,\n            })\n        }\n\n        #[cfg(not(any(unix, windows)))]\n        {\n            panic!(\"Unsupported platform!\")\n        }\n    }\n\n    /// Return a reference to the plugin interface of the dynamic plugin.\n    pub fn plugin(&self) -> &dyn Plugin {\n        &*self.plugin\n    }\n\n    /// Return a reference to the plugin interface of the dynamic plugin.\n    pub(crate) fn plugin_mut(&mut self) -> &mut dyn Plugin {\n        &mut *self.plugin\n    }\n}\n\n/// Implementation of DynamicPluginTrait that (re)loads Rust code from Rust dylib .\npub struct DyLibDynamicPlugin {\n    /// Dynamic plugin state.\n    state: PluginState,","sourceCodeStart":60,"sourceCodeEnd":96,"githubUrl":"https://github.com/FyroxEngine/Fyrox/blob/76c91aad8eca488ce527b1af707be8b3b24ad72d/fyrox-impl/src/plugin/dylib.rs#L60-L96","documentation":"DynamicPlugin::load only supports dynamic library loading on unix and windows; on any other target platform the cfg-guarded branch panics with \"Unsupported platform!\". The dylib plugin system is simply not implemented elsewhere.","triggerScenarios":"Calling DynamicPlugin::load on a platform that is neither unix nor windows (e.g. wasm, android non-libdl targets) with the dylib feature enabled.","commonSituations":"Compiling a Fyrox game with plugin hot-reloading for wasm/web or embedded targets; cross-compiling to unsupported platforms.","solutions":["Disable the dylib/plugin-dylib feature and use statically linked plugins on unsupported platforms","Target only unix or windows when using dynamic plugins","Guard plugin loading code with #[cfg(any(unix, windows))]"],"exampleFix":"// before\nlet plugin = DynamicPlugin::load(path, user_data, true)?;\n// after\n#[cfg(any(unix, windows))]\nlet plugin = DynamicPlugin::load(path, user_data, true)?;\n#[cfg(not(any(unix, windows)))]\nlet plugin = create_static_plugin()?;","handlingStrategy":"validation","validationCode":"#[cfg(not(any(unix, windows)))]\ncompile_error!(\"DynamicPlugin requires unix or windows\");","typeGuard":null,"tryCatchPattern":"let plugin = std::panic::catch_unwind(|| DynamicPlugin::load(...)).ok();","preventionTips":["Gate dylib plugin code behind cfg(any(unix, windows))","Use static plugins for cross-platform targets","Document platform requirements of the dylib feature"],"tags":["platform","dylib","plugins","panic"],"backgroundTag":"unsupported-platform","analyzedSha":"76c91aad8eca488ce527b1af707be8b3b24ad72d","analyzedAt":"2026-09-10T16:04:01.633Z","contentChangedAt":"2026-09-10T16:04:01.633Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}