DioxusLabs/dioxus · error · syn::Error
Only type and function declarations are supported in FFI blo
Error message
Only type and function declarations are supported in FFI blocks
What it means
Error "Only type and function declarations are supported in FFI blocks" thrown in DioxusLabs/dioxus.
Source
Thrown at packages/manganis/manganis-macro/src/ffi.rs:318
));
}
};
let mut types = Vec::new();
let mut functions = Vec::new();
for item in &item.items {
match item {
ForeignItem::Type(ty) => {
types.push(ForeignTypeDecl {
name: ty.ident.clone(),
});
}
ForeignItem::Fn(func) => {
functions.push(ForeignFunctionDecl::from_foreign_fn(func)?);
}
_ => {
return Err(syn::Error::new(
item.span(),
"Only type and function declarations are supported in FFI blocks",
));
}
}
}
Ok(Self {
source_path,
abi,
types,
functions,
})
}
/// Generate all the code
pub fn generate(&self) -> TokenStream2 {
match self.abi {View on GitHub (pinned to 393d190a80)
When it happens
Trigger: Thrown at packages/manganis/manganis-macro/src/ffi.rs:318 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of DioxusLabs/dioxus@393d190a80 (2026-08-16).
Data as JSON: /api/errors/5f2a32a6c07e8c1e.
Report an issue: GitHub.