flapigen-rs
flapigen-rs copied to clipboard
Annotating structs/methods directly
Most of the time I'm defining a struct in my Rust code, and defining almost exactly the same thing again in the java_glue or cpp_glue.
Seeing as most of it is usually the same, is there a technical barrier that prevents us from doing something a bit more like the way wasm_bindgen does it for JavaScript?
Seeing as most of it is usually the same, is there a technical barrier that prevents
Main use case for rust_swig
is wrapping code that not belong to crate where build.rs
runs.
So such kind of syntax:
#[rust_swig]
impl Foo {
is almost useless, because of it is possible to support such syntax only in the main crate,
which own build.rs
that invoke rust_swig
. But in my case, I export ~100 foreign_class, and only 3-4 from the current crate, so I don't really see how it helps.
May be in future, when Rust compiler will become much faster it wouldn't be necessary to divide code into many crates, but for now...
So I am not against the idea, I just don't see how it helps.