Skip to content

c_int, c_char, etc not supported as arguments #1015

@danakj

Description

@danakj

Similar to #592 but seems different.

I want to write an extern "C" function in cxx::bridge that receives an int or char or long or unsigned int etc. These types are represented in Rust with:

However cxx produces an error that the type is not supported. So I end up falling back to writing wrapper functions on the C++ side with different types (like int32_t, uint8_t, or unsigned char), and generating bindings to them, but this is a big thorn for people trying to generate wrappers to typical C++ code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions