rust-jni-bridge

Bridge Rust and Kotlin on Android using JNI binding patterns.

58|4|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/po4yka/RIPDPI --skill rust-jni-bridge
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-jni-bridge
Source: https://github.com/po4yka/RIPDPI/tree/main/.github/skills/rust-jni-bridge
Command: npx skills add https://github.com/po4yka/RIPDPI --skill rust-jni-bridge

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Bridges Rust and Kotlin on Android by providing JNI binding patterns, examples, and best practices.

Core Features & Use Cases

  • Guidance on raw JNI usage with the jni crate for manual bindings and UniFFI for auto-generated bindings.
  • Comparative analysis to help teams decide which path to adopt based on API surface and maintenance needs.
  • Example code snippets and integration tips for exposing Rust logic to Kotlin in Android apps.

Quick Start

Implement a minimal Rust function and expose it to Kotlin via JNI using the provided patterns.

Frequently Asked Questions about rust-jni-bridge

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I call Rust code from Kotlin on Android?▼

You can expose Rust code to Kotlin on Android by using JNI binding patterns and examples. This Skill provides best practices for bridging performance-sensitive native Rust components to managed Kotlin UI code safely.

What is the best way to expose Rust libraries to Kotlin, using raw JNI or UniFFI?▼

The best way to expose Rust libraries depends on your API surface and maintenance needs. This Skill provides a comparative analysis between manual raw JNI bindings and auto-generated UniFFI bindings to help your team decide which path to adopt.

How do I handle cross-language error mapping between Rust and Kotlin?▼

Cross-language error mapping between Rust and Kotlin requires safe type mapping patterns. This Skill offers guidance on safe cross-language error handling and type mappings to ensure robust communication across the FFI boundary.

Do I need the jni crate to create Rust bindings for Android apps?▼

You need the jni crate if you choose the raw JNI usage path for manual bindings. Alternatively, you can use UniFFI for auto-generated bindings, and this Skill provides decision guidance to help you choose the right approach.

How does JNI bridge performance-sensitive components to managed Android code?▼

JNI bridges performance-sensitive components to managed Android code by providing a native interface for cross-language communication. This Skill explains how to apply these patterns to expose Rust logic directly to your Kotlin Android application.