This project allows you to use rust objects like part of jvm objects.

JVM

class Sample extends AutoCloseable { @native private def nnew(): Long @native def close: Unit @native def test: Unit private val ptr = nnew() override def finalize = close }

Rust

```

[derive(JFace)]

pub struct Sample { … } ```

```

[no_mangle]

pub extern "system" fn JavapackageSamplennew( jenv: JNIEnv, _jclass: JClass, ) -> *mut Sample { Sample::new().jni().throw(jenv, nullmut) } ```

```

[no_mangle]

pub extern "system" fn JavaorgapqmjniSampletest( jenv: JNIEnv, jclass: JClass, ) { Sample::mutraw(&jenv, jclass).map(|it| { todo!() }).throw(jenv, unit); } ```

```

[no_mangle]

pub extern "system" fn JavaorgapqmjniSampleclose( jenv: JNIEnv, jclass: JClass, ) { Sample::boxraw(&jenv, jclass).map(hide).throw(jenv, unit) } ```

License

Licensed under either of