Releases: xpenatan/jParser
Release list
v1.2.1
FFM, TeaVM C preview, and the jParser Gradle plugin
jParser 1.2.1 is a cumulative release covering 138 commits since v1.0.0, including changes from the 1.1.x and 1.2.0 tags that did not receive separate GitHub releases.
The two major directions announced in v1.0.0 are now here: a desktop Foreign Function & Memory API backend and a new TeaVM C path. This release also introduces a Gradle plugin that makes binding projects substantially easier to configure and build.
Highlights
New jParser Gradle plugin
- Added plugin ID
com.github.xpenatan.jparser, published through Maven Central asjparser-gradle-plugin. - Added a typed
jParser { ... }DSL that replaces much of the handwrittenBuilderTool, JavaExec, dependency, and native-target setup. - Added standard
jParser_generateandjParser_build_<target>tasks across JNI, FFM, TeaVM Web/WASM, and TeaVM C. - Added typed
JParserTargets, symbol naming modes, per-platform and per-Android-ABI native hooks, source selection, compiler/linker configuration, and task dependencies. - Added native target variants with isolated output directories for alternative backends.
- Added shared-library dependency wiring, IDL renaming, and runtime-helper configuration.
See the TestLib plugin example.
Foreign Function & Memory API
- Added desktop FFM binding generation using Java MethodHandle downcalls and generated C ABI glue.
- Added Windows, Linux, macOS x64, and macOS Arm64 targets.
- Added support for constructors, methods, attributes, strings, buffers, enums, and native callbacks.
- Added configurable and automatically selected critical downcalls, callback critical-state fixes, debug logging, and symbol obfuscation.
- Fixed direct
ByteBufferoffset handling and several callback crash paths.
FFM requires JDK 22 or newer; JDK 25 is recommended by the project.
TeaVM C backend — preview
- Added
TEAVM_Cnative blocks and thegen_teavm_cgeneration path. - Generates TeaVM
@ImportJava bindings together with fixed-width C ABI glue inTeaVMCGlue.cpp/.h. - Added callback exports and native function-pointer bridges.
- Added Windows, Linux, macOS, and Android native targets, including Android x86, x86_64, armeabi-v7a, and arm64-v8a payloads.
- Added dedicated desktop and Android TeaVM C examples.
- Added
runtime-c, desktop platform payloads,runtime-android-c, and per-ABI Android payloads. - Added classpath-driven
emu.c.*andgen.c.*substitutions. - Native library sources can now be compiled as C or C++, while generated TeaVM C glue uses C++17.
Runtime, build, and publishing improvements
- Reorganized generator, API, runtime, shared, desktop, Android, and web modules around their binding families.
- Split published Java APIs from platform-specific native and WebAssembly payloads.
- Improved native inclusion in local application JARs and fixed Windows, WebAssembly, and Android artifact naming.
- Added per-ABI Android build configuration.
- Improved MSVC discovery through environment variables,
PATH, Visual Studio variables, andvswhere. - Improved Android NDK and Emscripten environment checks.
- Updated TeaVM from 0.13 to 0.15.
- Added JNI/FFM benchmarks, callback and buffer tests, plugin TestKit coverage, and refreshed examples and documentation.
Breaking and upgrade notes
- Public API names changed:
IDLBase→NativeObjectIDLEnum→NativeEnum- Runtime helpers such as
IDLInt,IDLString, andIDLArray→NativeInt,NativeString, andNativeArray
- Maven artifacts and Gradle modules were reorganized:
jParser-*generator artifacts →gen-*idl-*→api-*idl-helper-*→runtime-*loader-teavm→loader-web
- Consumer layouts now use
base,builder,core, shared JNI/C modules, platform-specific desktop and Android modules, and a dedicated web module. - Plugin target configuration now uses
JParserTargetsinstead of raw target strings. - The published 1.2.1 Gradle plugin targets JVM 25, so Gradle must run with JDK 25.
- Official Windows examples and CI now use MSVC rather than MinGW.
- Published native and web payloads use separate platform or ABI artifacts. See the runtime artifact guide.
Known preview limitations
- In 1.2.1, each target-specific
jParser_build_*task still invokes aggregate generation. Projects configuring several API families may regenerate every configured family. - Generated TeaVM C
external_cppand CMake resources are not automatically included in C-module JARs yet, so classpath-based TeaVM C integration may require manual resource wiring. - iOS selectors exist in the build API, but the iOS path remains work in progress and is not part of the verified support matrix.
Full Changelog: 1.0.0...1.2.1
v1.0.0
After an intense journey of 1000 commits, countless experiments, refactors, and cross-platform tests, jParser has graduated from beta and reached a stable 1.0.0 release.
This version successfully compiles and runs on most major platforms:
- Windows
- Linux
- macOS
- Android
- HTML5 (TeaVM + Emscripten)
iOS is the current exception — the setup is not yet fully working, but a solution should arrive soon.
Getting to this point wasn't easy.
Making shared libraries work reliably across all these targets required many attempts, different approaches, and a lot of patience — but the result is worth it: a solid foundation you can trust.
What's next?
Future versions will bring several exciting improvements:
- Better build system & quality-of-life enhancements
- Exploration of Java's Foreign Function & Memory API (Project Panama / FFM) as an alternative generator
- Investigation of TeaVM's C compiler
Happy coding! 🚀