duchess-rs / duchess

Silky smooth Java-Rust interop

Home Page:https://duchess-rs.github.io/duchess/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

derive ToRust, JvmOp, and ToJava for structs

nikomatsakis opened this issue · comments

I'm currently working on a derive for structs to replace some of the boilerplate code in auth. Basic idea

#[derive(duchess::Java)]
#[java(some.java.Class)]
struct Foo {
    /* fields must correspond to arguments of constructor as well as accessor methods, unless there is a special `this` field */
}

we can work on improvements and extensions iteratively (as well as supporting enums).