Expand description
It’s temporary fork for https://crates.io/crates/jni. Don’t use!
Modules§
- descriptors
- Descriptors for classes and method IDs.
- errors
- Errors. Do you really need more explanation?
- objects
- Wrappers for object pointers returned from the JVM.
- signature
- Parser for java type signatures.
- strings
- String types for going to/from java strings.
- sys
jni-sysre-exports
Structs§
- Attach
Guard - A RAII implementation of scoped guard which detaches the current thread
when dropped. The attached
JNIEnvcan be accessed through this guard via itsDerefimplementation. - Executor
- Thread attachment manager. It allows to execute closures in attached threads with
automatic local references management done with
with_local_frame. It combines the performance benefits of permanent attaches whilst removing the risk of local references leaks if used consistently. - Init
Args - JavaVM InitArgs.
- Init
Args Builder - Builder for JavaVM InitArgs.
- JNIEnv
- FFI-compatible JNIEnv struct. You can safely use this as the JNIEnv argument to exported methods that will be called by java. This is where most of the magic happens. All methods on this object are wrappers around JNI functions, so the documentation on their behavior is still pretty applicable.
- JavaVM
- The Java VM, providing Invocation API support.
- Monitor
Guard - Guard for a lock on a java object. This gets returned from the
lock_objmethod. - Native
Method - Native method descriptor.
Enums§
- JNIVersion
- JNI Version
- JvmError
- Errors that can occur when invoking a
JavaVMwith the Invocation API.
Constants§
- DEFAULT_
LOCAL_ FRAME_ CAPACITY - The capacity of local frames, allocated for attached threads by default. Same as the default value Hotspot uses when calling native Java methods.