You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for taking the time to put together this example project. This has been very useful for my introduction into calling Rust libs from Java. Can you please provide an example illustrating the changes required to allow a Java program to call a function declared within a Struct impl? For example, assume you add a new fn called "string" within the existing "Greeting" impl that accepts a param called length (u32 or whatever) and returns a const char * that acts as a String in Java. How would I call this on the Java side? Would I create a new "string" method in Greeting.java that matches the signature? Is this even possible? I'm trying to understand if I can preserve the OOP abstractions from Rust in Java or if I have to have all C-like flat function representations for Java/JNA to work.
Thank you for taking the time to put together this example project. This has been very useful for my introduction into calling Rust libs from Java. Can you please provide an example illustrating the changes required to allow a Java program to call a function declared within a Struct impl? For example, assume you add a new fn called "string" within the existing "Greeting" impl that accepts a param called length (u32 or whatever) and returns a const char * that acts as a String in Java. How would I call this on the Java side? Would I create a new "string" method in Greeting.java that matches the signature? Is this even possible? I'm trying to understand if I can preserve the OOP abstractions from Rust in Java or if I have to have all C-like flat function representations for Java/JNA to work.