Expand description
Java: the JNI wrapper (the original classes’ static methods over the Rust library), a small JSON codec with no dependencies, and the reflection driver for record, diff and bench.
Constants§
- DRIVER_
JAVA rustanything/RustAnythingDriver.java: calls static methods by name for record, diff and bench.- ERROR_
JAVA rustanything/RustAnythingError.java: the error the Rust side throws, turned into the real exception type in Java.- JSON_
JAVA rustanything/RustAnythingJson.java: JSON text to Java values and back, conversion to declared generic types, and the markers for floats JSON cannot carry.- WIRE_
JAVA rustanything/RustAnythingWire.java: the Java half of the binary wire.
Functions§
- native_
class - The native class: loads the Rust library and calls the dispatcher.
- shadows
- Shadow classes,
<Class>Shadowbeside each original class: the same static methods, running the original and the Rust port, returning the original’s result and counting mismatches.-Drust-anything.mode=oldruns the original only,newthe port only. - targets
{ name: [class, method] }for the driver.- typed_
rs - Typed JNI functions for
lib.rs, appended after the JSON dispatcher. - wire_rs
- Rust code of every wire export, for
lib.rs. - wrappers
- The wrapper classes:
(path, source)for each class of the unit with ported methods.