JVM
Status
Planned. Development will begin after the Python binding stabilizes.
Timeline
The JVM binding will target Java 22+ and Kotlin, following the Rust binding in priority.
Architecture
The JVM binding will use the C FFI layer over the core crate, accessed via the Panama Foreign Function API (JEP 454, finalized in JDK 22).
Java / Kotlin application code
|
v
aster-jvm library Idiomatic Java API: annotations,
CompletableFuture / Flow async model
|
| Panama Foreign Function API (JDK 22+)
v
libaster.so / .dylib C FFI shared library built from
the ffi/ crate
|
v
core crate (Rust) Same backend as Python binding
|
v
iroh crates
Key design decisions
- Annotations will replace Python's decorators:
@AsterService,@Rpc,@WireType("ns/Type"). - Java records are the natural equivalent of Python dataclasses for wire types.
- Apache Fory Java provides XLANG serialization, ensuring wire compatibility with the Python binding.
- Async model will use
CompletableFuturefor unary calls andjava.util.concurrent.Flow(Reactive Streams) for streaming patterns. - Panama FFI avoids JNI overhead and provides safer memory management for native calls.
Requirements
- JDK 22+ (for finalized Panama Foreign Function API).
- The
libasternative library for the target platform.
Further reading
- Cross-Language Interop for how wire types enable multi-language deployments