{"record":{"id":"a844414b38e6cd39","repo":"DioxusLabs/dioxus","slug":"lazy-initialization-is-only-supported-with-tokio-a","errorCode":null,"errorMessage":"Lazy initialization is only supported with tokio and threads enabled.","messagePattern":"Lazy initialization is only supported with tokio and threads enabled\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/fullstack/src/lazy.rs","lineNumber":165,"sourceCode":"    {\n        let ptr: F = unsafe { std::mem::zeroed() };\n        let fut = ptr();\n        return std::thread::spawn(move || {\n            tokio::runtime::Builder::new_current_thread()\n                .enable_all()\n                .build()\n                .unwrap()\n                .block_on(fut)\n                .map_err(|e| e.into())\n        })\n        .join()\n        .unwrap();\n    }\n\n    // todo: technically we can support constructors in wasm with the same tricks inventory uses with `__wasm_call_ctors`\n    // the host would need to decide when to cal the ctors and when to block them.\n    #[cfg(not(feature = \"server\"))]\n    unimplemented!(\"Lazy initialization is only supported with tokio and threads enabled.\")\n}\n","sourceCodeStart":147,"sourceCodeEnd":167,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/fullstack/src/lazy.rs#L147-L167","documentation":"Lazy::blocking_initialize was called on a target where neither tokio nor thread support is compiled in (e.g. embedded or restricted wasm builds). Blocking initialization needs a runtime to poll the future, so unsupported configurations hit this guard.","triggerScenarios":"Thrown at packages/fullstack/src/lazy.rs:165 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Lazy initialization requires tokio with threads. Enable a multi-threaded tokio runtime."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}