DioxusLabs/dioxus · error · syn::Error

Expected ABI string (e.g., extern "Swift")

Error message

Expected ABI string (e.g., extern "Swift")

What it means

Error "Expected ABI string (e.g., extern "Swift")" thrown in DioxusLabs/dioxus.

Source

Thrown at packages/manganis/manganis-macro/src/ffi.rs:297

impl FfiBridgeParser {
    /// Parse the attribute and item together
    pub fn parse_with_attr(attr: FfiAttribute, item: ItemForeignMod) -> syn::Result<Self> {
        let source_path = attr.source_path;

        // Determine the ABI
        let abi = match &item.abi.name {
            Some(name) => match name.value().as_str() {
                "Swift" => ForeignAbi::Swift,
                "Kotlin" => ForeignAbi::Kotlin,
                other => {
                    return Err(syn::Error::new(
                        name.span(),
                        format!("Unsupported ABI: {}. Expected 'Swift' or 'Kotlin'", other),
                    ));
                }
            },
            None => {
                return Err(syn::Error::new(
                    item.abi.extern_token.span,
                    "Expected ABI string (e.g., extern \"Swift\")",
                ));
            }
        };

        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)?);

View on GitHub (pinned to 393d190a80)

When it happens

Trigger: Thrown at packages/manganis/manganis-macro/src/ffi.rs:297 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/386e5c50d64fb6e6. Report an issue: GitHub.