dtolnay/cxx

Shared structs with type parameters

Open

#54 opened on 2020年3月2日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Rust (4,472 stars) (253 forks)batch import
help wanted

説明

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>);
    }
}

コントリビューターガイド

Shared structs with type parameters · dtolnay/cxx#54 | Good First Issue