Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shared structs with type parameters #54

Open
dtolnay opened this issue Mar 2, 2020 · 1 comment
Open

Shared structs with type parameters #54

dtolnay opened this issue Mar 2, 2020 · 1 comment

Comments

@dtolnay
Copy link
Owner

dtolnay commented Mar 2, 2020

We should support structs that have type parameters and translate them to an ABI-compatible class template in C++.

#[cxx::bridge]
mod ffi {
    struct Generic<T> {
        wow: T,
    }

    extern "C" {
        fn f(g: Generic<String>);
    }
}
@dtolnay
Copy link
Owner Author

dtolnay commented Apr 28, 2020

Marking help wanted, but please only move forward with this if you have a concrete use case for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant