DioxusLabs/dioxus · error · syn::Error

Unsupported type

Error message

Unsupported type

What it means

Error "Unsupported type" thrown in DioxusLabs/dioxus.

Source

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

                        }
                    }
                }
                Err(syn::Error::new(ty.span(), "Unsupported type path"))
            }
            Type::Reference(type_ref) => {
                if let Type::Path(path) = &*type_ref.elem {
                    if path.path.is_ident("str") {
                        return Ok(ForeignType::StrRef);
                    }
                    // Check for &OpaqueType
                    if path.path.segments.len() == 1 {
                        return Ok(ForeignType::OpaqueRef(path.path.segments[0].ident.clone()));
                    }
                }
                Err(syn::Error::new(ty.span(), "Unsupported reference type"))
            }
            Type::Tuple(tuple) if tuple.elems.is_empty() => Ok(ForeignType::Unit),
            _ => Err(syn::Error::new(ty.span(), "Unsupported type")),
        }
    }

    /// Get the JNI signature for this type
    fn jni_signature(&self) -> String {
        match self {
            ForeignType::Bool => "Z".into(),
            ForeignType::I8 => "B".into(),
            ForeignType::I16 => "S".into(),
            ForeignType::I32 => "I".into(),
            ForeignType::I64 => "J".into(),
            ForeignType::U8 => "B".into(), // JNI doesn't have unsigned, use signed
            ForeignType::U16 => "S".into(),
            ForeignType::U32 => "I".into(),
            ForeignType::U64 => "J".into(),
            ForeignType::F32 => "F".into(),
            ForeignType::F64 => "D".into(),
            ForeignType::String | ForeignType::StrRef => "Ljava/lang/String;".into(),

View on GitHub (pinned to 393d190a80)

When it happens

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