cxx
cxx copied to clipboard
Are associated functions supported?
For example:
struct Foo {};
impl Foo {
fn foo() -> u16;
}
#[cxx::bridge]
mod ffi {
extern "Rust" {
type Foo;
// How can I indicate this is `Foo::foo()`?
fn foo() -> u16; // Error: cannot find function `foo` in module `super`
}
}
If this is supported, I guess adding an example here would be very helpful.
(Note that the example lacks &self).