java-bindings-patterns | Skill Performance & Reviews | TopRankSkills

TopRank Skills

Home / Skills / development / java-bindings-patterns

java-bindings-patterns

maintained by kreuzberg-dev

star 560 account_tree 50 verified_user MIT License
bolt View GitHub

name: java-bindings-patterns description: "Instructions for java bindings patterns."


priority: high

Java Bindings Patterns

Role: Java bindings for Rust core. Work on C FFI bridge and Java wrapper packages.

Scope: Java 25 Foreign Function & Memory API (FFM/Panama), Java-idiomatic API, JUnit 5 tests, Javadoc.

Architecture: Java FFM API → C FFI library → Rust core. No JNI, modern Foreign Function API.

Commands: cd packages/java && mvn clean compile test, mvn checkstyle:check, mvn spotless:apply.

E2E Tests: Auto-generated from fixtures via e2e-generator. Regenerate tests when fixtures change.

Critical: Core logic lives in Rust. Java only for FFI bindings/wrappers. If core logic needed, coordinate with Rust team.

Key files: Core.java (high-level API), CoreFFI.java (FFI bindings), config/* (builder pattern), Exception.java (exception hierarchy).

Code quality: Zero Checkstyle/PMD warnings, use mvn checkstyle:check and mvn spotless:apply.

Java 25 Standards & FFM API

  • Java 25 exclusively; FFM API for native interop, sealed classes, records, pattern matching
  • Build: Maven (pom.xml) or Gradle (build.gradle.kts); compiler release=25
  • JUnit 5: @Nested classes, @ParameterizedTest, AssertJ fluent assertions, 80%+ coverage
  • Checkstyle: 4-space indent, line <=120 chars, Javadoc on public APIs
  • PMD: UnusedVariable, EmptyCatchBlock, AvoidDuplicateLiterals enabled
  • FFM patterns: Arena for memory management, try-with-resources, bounds validation
  • Naming: PascalCase (classes), camelCase (methods/fields), UPPER_SNAKE_CASE (constants)
  • Best practices: final on classes/methods, immutable records, Optional<T> not null

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!

Skill Details

GitHub Stars 560
GitHub Forks 50
Created Mar 2026
Last Updated 4 months ago
development development architecture patterns

Related Skills

dagger-design-proposals
chevron_right
nestjs-expert
chevron_right
docker-expert
chevron_right
kafka-streams-topology
chevron_right
kafka-architecture
chevron_right

Build your own?

Join 12,000+ developers contributing to the Claude ecosystem.