Open ultimaweapon opened 7 months ago
I need something like this but don't know how to configure the cbindgen::Builder
to achieve this result.
Send a patch adding it to Parse::add_std_types
to get what you want. Alternatively, add the raw forward declaration using one of the other config options?
Thank you for the response. I'll send a patch when I have time to work on this.
@emilio Why do we automatically generate opaque types for non repr(C)
structs, but have to manually list out the std types we want to consider as opaque?
Also, shouldn't we add an option to force a type to be opaque? I guess that would solve the problem more generally, because then someone could just say they want Mutex to be opaque through cbindgen.toml.
Is it possible for cbindgen to automatically generate an opaque type for
Mutex
for this function?What I got from this is something like without opaque type for
Mutex
: