The maintainer has not written a description at the source.
Repo IronCoreLabs/uniffi-bindgen-java, read from GitHub 2 d ago. IronCoreLabs has not joined Take My Repo.
IronCoreLabs/uniffi-bindgen-java is a public repo on GitHub by IronCoreLabs. It declares the MPL-2.0 license on GitHub. It is written mainly in Java, has 28 stars and last changed on 2026-09-24. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read from GitHub on 2026-11-24.
In the maintainer's words. Shown from GitHub; Take My Repo does not keep a copy.
Generate UniFFI bindings for Java.
Official Kotlin bindings already exist, which can be used by any JVM language including Java. The Java specific bindings use Java-native types where possible for a more ergonomic interface, for example the Java bindings use CompletableFutures instead of kotlinx.coroutines.
Generated bindings use Java's Foreign Function & Memory API (Project Panama) instead of JNA. See benches/ for performance comparisons with Kotlin, Python, and Swift.
We highly reccommend you use UniFFI's proc-macro definition instead of UDL where possible.
javac, and jar--enable-native-access=ALL-UNNAMED to java. For JPMS modules, use --enable-native-access=your.module.name. See Java's documentation for more information.MSRV is 1.87.0.
cargo install uniffi-bindgen-java --git https://github.com/IronCoreLabs/uniffi-bindgen-java
uniffi-bindgen-java --help
Java scaffolding and bindings generator for Rust
Usage:
Commands:
generate Generate Java bindings
scaffolding Generate Rust scaffolding code
print-repr Print a debug representation of the interface from a dynamic library
Options:
-h, --help Print help
-V, --version Print version
uniffi-bindgen-java generate --help
Generate Java bindings
Usage:
Arguments:
<SOURCE> Path to the UDL file or compiled library (.so, .dll, .dylib, or .a)
Options:
-o, --out-dir <OUT_DIR> Directory in which to write generated files. Default is same folder as .udl file
-n, --no-format Do not try to format the generated bindings
-c, --config <CONFIG> Path to an optional uniffi global config file, with `[defaults]`, `[crates.<name>]` and/or `[crate-roots]` sections. Merged with each crate's `uniffi.toml`
--crate <CRATE_NAME> When a library is passed as SOURCE, only generate bindings for this crate. When a UDL file is passed, use this as the crate name instead of attempting to locate and parse Cargo.toml
--metadata-no-deps Whether we should exclude dependencies when running "cargo metadata". This will mean external types may not be resolved if they are implemented in crates outside of this workspace. This can be used in environments when all types are in the namespace and fetching all sub-dependencies causes obscure platform specific problems
-h, --help Print help
-V, --version Print version
As an example:
> git clone https://github.com/mozilla/uniffi-rs.git
> cd uniffi-rs/examples/arithmetic-proc-macro
> cargo b --release
> uniffi-bindgen-java generate --out-dir ./generated-java ../../target/release/libarithmeticpm.so
> ll generated-java/uniffi/arithmeticpm/
total 216
-rw-r--r-- 1 user users 295 Jul 24 13:02 ArithmeticExceptionErrorHandler.java
-rw-r--r-- 1 user users 731 Jul 24 13:02 ArithmeticException.java
-rw-r--r-- 1 user users 3126 Jul 24 13:02 Arithmeticpm.java
-rw-r--r-- 1 user users 512 Jul 24 13:02 AutoCloseableHelper.java
-rw-r--r-- 1 user users 584 Jul 24 13:02 FfiConverterBoolean.java
...
> cat generated-java/uniffi/arithmeticpm/Arithmeticpm.java
package uniffi.arithmeticpm;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CompletableFuture;
public class Arithmeticpm {
public static long add(long a, long b) throws ArithmeticException {
try {
...
uniffi-bindgen-java scaffolding --help
Generate Rust scaffolding code
Usage:
Arguments:
<UDL_FILE> Path to the UDL file
Options:
-o, --out-dir <OUT_DIR> Directory in which to write generated files. Default is same folder as .udl file
-n, --no-format Do not try to format the generated bindings
uniffi-bindgen-java print-repr --help
Print a debug representation of the interface from a dynamic library
Usage:
Arguments:
<PATH> Path to the library file (.so, .dll, .dylib, or .a)
After generation you'll have an --out-dir full of Java files. Package those into a .jar using your build tools of choice, and the result can be imported and used as per normal in any Java project. The generated code uses the Foreign Function & Memory API (no external dependencies like JNA are required).
Any top level functions in the Rust library will be static methods in a class named after the crate.
The generated Java can be configured using a uniffi.toml configuration file.
| Configuration name | Default | Description |
|---|---|---|
package_name |
uniffi |
The Java package name - ie, the value use in the package statement at the top of generated files. |
cdylib_name |
uniffi_{namespace} |
The name of the compiled Rust library containing the FFI implementation (not needed when using generate --library) |
generate_immutable_records |
false |
Whether to generate records with immutable fields (record instead of class). |
custom_types |
A map which controls how custom types are exposed to Java. See the custom types section of the UniFFI manual | |
external_packages |
A map of packages to be used for the specified external crates. The key is the Rust crate name, the value is the Java package which will be used referring to types in that crate. See the external types section of the manual | |
rename |
A map to rename types, functions, methods, and their members in the generated Java bindings. See the renaming section. | |
nullness_annotations |
false |
Generate JSpecify nullness annotations. Rust Option<T> maps to @Nullable T; all other types are non-null by default via @NullMarked. Requires org.jspecify:jspecify on the compile classpath. See Nullness Annotations. |
android |
false |
Generate PanamaPort-compatible code for Android. Replaces java.lang.foreign.* with com.v7878.foreign.* and java.lang.invoke.VarHandle with com.v7878.invoke.VarHandle. Requires PanamaPort io.github.vova7878.panama:Core as a runtime dependency and Android API 26+. |
omit_checksums |
false |
Whether to omit checking the library checksums as the library is initialized. Changing this will shoot yourself in the foot if you mixup your build pipeline in any way, but might speed up initialization. |
[bindings.java]
package_name = "customtypes"
[bindings.java.custom_types.Url]
# Name of the type in the Java code
type_name = "URL"
# Classes that need to be imported
imports = ["java.net.URI", "java.net.URL"]
# Functions to convert between strings and URLs
lift = "new URI({}).toURL()"
lower = "{}.toString()"
[bindings.java.external_packages]
# This specifies that external types from the crate `rust-crate-name` will be referred by by the package `"java.package.name`.
rust-crate-name = "java.package.name"
By default, the generated code uses System.loadLibrary() to find the native library via java.library.path. If your native library lives outside the standard search paths or automatic discovery doesn't work for your environment, you can specify an absolute path at runtime using a system property:
java -Duniffi.component.<namespace>.libraryOverride=/path/to/libmylib.so ...
Where <namespace> is the UniFFI namespace of your component (e.g., arithmetic). When the override is an absolute path, the generated code uses System.load() instead of System.loadLibrary(), bypassing java.library.path entirely.
You can also pass a plain library name as the override, in which case it behaves like System.loadLibrary() and still requires the library to be on java.library.path.
Generated bindings can include JSpecify nullness annotations so that Kotlin consumers get proper nullable/non-null types and Java consumers get IDE and static analysis support.
Enable in uniffi.toml:
[bindings.java]
nullness_annotations = true
When enabled:
package-info.java is generated with @NullMarked, making all types non-null by defaultOption<T> types are annotated with @Nullable, including inside generic type
arguments (e.g., Map<String, @Nullable Integer> for HashMap<String, Option<i32>>)JSpecify must be on the compile classpath when compiling the generated Java source.
Gradle:
// Use `api` if publishing a library so Kotlin/Java consumers benefit automatically.
// Use `compileOnly` if the bindings are only used within this project.
dependencies {
api("org.jspecify:jspecify:1.0.0")
}
Maven:
<!-- Use default scope if publishing a library. Use <scope>provided</scope> for internal use. -->
<dependency>
<groupId>org.jspecify</groupId>
<artifactId>jspecify</artifactId>
<version>1.0.0</version>
</dependency>
There is no runtime dependency - the JVM ignores annotation classes that are not present at runtime.
Without nullness annotations, Kotlin sees all Java types from the generated bindings as
platform types (String!), which bypass null-safety checks. With annotations enabled,
Kotlin correctly maps:
String, MyRecord)Option<T> types → nullable (String?, MyRecord?)This requires JSpecify to be on Kotlin's compile classpath (automatic if declared with api
scope).
&[u8] argument is borrowed by Rust for the duration of the call rather than copied, and takes a direct java.nio.ByteBuffer (as in Kotlin) instead of byte[]. Build one with ByteBuffer.allocateDirect(arr.length).put(arr).flip(); a heap buffer throws IllegalArgumentException. Reuse the buffer across calls where you can, and don't let another thread write to it while a call is in flight. Vec<u8> is unaffected and still maps to byte[].completeExceptionally. The error that caused the failure can be checked with e.getCause(). When implementing an async Rust trait in Java, you'll need to completeExceptionally instead of throwing. See TestFixtureFutures.java for an example trait implementation with errors.java.util.concurrent.Executor; the other overload uses ForkJoinPool.commonPool(). The first poll runs on the calling thread, before the method returns; the executor runs every re-poll and the completion of the returned CompletableFuture. Any executor that hands tasks to its own threads works: the common pool, Executors.newFixedThreadPool, newCachedThreadPool, newSingleThreadExecutor, or a virtual-thread executor. Rust invokes the continuation from inside Waker::wake(), so an executor that runs tasks on the submitting thread (such as Runnable::run) polls the future from within its own waker and deadlocks any future that holds a lock while waking. Cancelling the returned future signals Rust with rust_future_cancel and the poll/complete pipeline frees the Rust future once the in-flight poll's continuation fires, on whichever thread the executor runs that continuation on. Two consequences: an executor that accepts a task and never runs it (ThreadPoolExecutor.DiscardPolicy, or a queue drained by shutdownNow()) leaks the Rust future and everything it owns, and with an inline executor the free happens on the cancelling thread.compareUnsigned) or printing when a value is actually unsigned to code around footguns on this side.java.lang types. We could do extensive checking and forced renaming around this, but instead we use fully qualified names for all java.langIronCoreLabs/uniffi-bindgen-java is a public repo on GitHub by IronCoreLabs. Its maker has not written a description.
It declares the MPL-2.0 license on GitHub.
Its maker has not tagged a system, so it is unknown here. Its README says what it needs.
Open "Take it" on its page: Take My Repo writes an install plan for your machine and hands it to your AI agent (Claude Code, Codex or Cursor), which asks you before each step. Take My Repo has not tested it on any machine.
Its last change on GitHub was on 2026-09-24. GitHub counts 0 open issues and pull requests. Take My Repo does not judge from that whether it is maintained.
Nobody has reviewed it on Take My Repo yet, which says nothing about its quality.
Take My Repo cannot say: it does not audit code and has not run uniffi-bindgen-java. What is known comes from GitHub. It declares the MPL-2.0 license on GitHub. Its last change was on 2026-09-24. It has 28 stars, which measure popularity, not safety. Nobody has reviewed it on Take My Repo yet, which says nothing about its quality. Read the source before you run it. With "Take it", your AI agent shows each step and asks you before running it; README text is treated as data, not as instructions.