{"record":{"id":"2559fe5c708bf7e7","repo":"wasmerio/wasmer","slug":"closures-functions-with-captured-environments-ar","errorCode":null,"errorMessage":"Closures (functions with captured environments) are currently unsupported with native functions. See: https://github.com/wasmerio/wasmer/issues/1840","messagePattern":"Closures \\(functions with captured environments\\) are currently unsupported with native functions\\. See: https://github\\.com/wasmerio/wasmer/issues/1840","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/api/src/backend/js/entities/function/mod.rs","lineNumber":590,"sourceCode":"        Self {\n            handle: internal.unwrap_js(),\n        }\n    }\n\n    pub(crate) fn vm_funcref(&self, _store: &impl AsStoreRef) -> VMFuncRef {\n        unimplemented!();\n    }\n\n    pub(crate) unsafe fn from_vm_funcref(\n        _store: &mut impl AsStoreMut,\n        _funcref: VMFuncRef,\n    ) -> Self {\n        unimplemented!();\n    }\n\n    #[track_caller]\n    fn closures_unsupported_panic() -> ! {\n        unimplemented!(\n            \"Closures (functions with captured environments) are currently unsupported with native functions. See: https://github.com/wasmerio/wasmer/issues/1840\"\n        )\n    }\n\n    /// Checks whether this `Function` can be used with the given context.\n    pub fn is_from_store(&self, _store: &impl AsStoreRef) -> bool {\n        true\n    }\n}\n\n#[cfg(feature = \"experimental-async\")]\nfn typed_args_from_values<Args>(\n    store: &mut StoreMut,\n    function_type: &FunctionType,\n    values: &[Value],\n) -> Result<Args, RuntimeError>\nwhere\n    Args: WasmTypeList,","sourceCodeStart":572,"sourceCodeEnd":608,"githubUrl":"https://github.com/wasmerio/wasmer/blob/8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5/lib/api/src/backend/js/entities/function/mod.rs#L572-L608","documentation":"Error \"Closures (functions with captured environments) are currently unsupported with native functions. See: https://github.com/wasmerio/wasmer/issues/1840\" thrown in wasmerio/wasmer.","triggerScenarios":"Thrown at lib/api/src/backend/js/entities/function/mod.rs:590 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"8c4b9ee9d33fb2068863fbb3d328683e7e6ff7f5","analyzedAt":"2026-09-01T23:06:31.009Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-09T06:17:21.866Z"}