JNAerator (licensed under LGPL 3.0) lets Java programmers access native libraries transparently, using a runtime such as BridJ (C / C++, BSD-license), JNA (C only, LGPL) or Rococoa (Objective-C), and now Node.js!

This release took a while longer than usual, but JNAerator’s moving to its own GitHub repo with Travis integration and all, hopefully making contributions easier :-).

The 0.12 release can be downloaded here, and here are its release notes (see full CHANGELOG):

  • Added -library foo -dependencies bar,baz to generate @Library("foo", dependencies = {"bar", "baz"})(issue nativelibs4java#535)
  • Added JNA-only -forceStringSignatures option to force String and String[] params even with char* and char** (as opposed to const char* and const char**) (issue nativelibs4java#476)
  • Added -skipDeprecated option for JNA output (issue nativelibs4java#480)
  • Added -forceNames option to issue Name annotations for all supported entities (issue nativelibs4java#443)
  • Added @Name support to all entities (issue nativelibs4java#443)
  • Added partial support for C++ namespaces with GCC-compiled libraries (issue nativelibs4java#446)
  • Added a new “peer pointer” constructor to JNA structures (issue nativelibs4java#442, thanks to topikachu@ for the patch!)
  • Added -publicRawBindings and -noRawBindings options (since -genRawBindings is now the default)
  • Added support for JNA 4.0.0 (implement getFieldOrder in all structs, see issue nativelibs4java#384)
  • Added support for node.js target runtime (see example of bindings: https://github.com/ochafik/node-opencl)
  • Added -optionalFunctions option to tag functions with @org.bridj.ann.Optional
  • Added mechanism to skip generation of entities (-skipStructs, -skipEnums, -skipFunctions)
  • Added -noStaticInit option for BridJ
  • Added -extractDeclarations option to create an interface with all the methods and types of a library (BridJ-specific)
  • Improved harvesting of header comments: go further away before the declaration, and remove leading * in oxygen comment lines (issue nativelibs4java#481)
  • Improved raw mode for BridJ callbacks: in raw mode, generate two crossed callbacks, one of which must be overridden.
  • Reverted to by-default chunks parsing, and added -parseInOnePiece instead of -parseChunks (makes parsing more robust to syntax errors)
  • Moved to ECJ 4.2.2
  • Dropped support for bit fields in JNA structs (users should implement bit manipulation logic manually or use BridJ: JNAerator’s fork of JNA that added this feature incurred too much maintenance work).
  • Dropped old shared library (DLL, Mach-O) scanning code, superseded by dyncall/dynload and BridJ’s demanglers.
  • Fixed missing actual name in raw native methods (issue nativelibs4java#499, thanks to @washley for the patch!)
  • Fixed handling of const char * const * params for JNA runtime (issue nativelibs4java#476)
  • Fixed duplicate bindings with -reification, caused by interaction with interface extraction feature (issue nativelibs4java#500)
  • Fixed duplicate & mismatching @Name annotations with -beautifyNames (issue nativelibs4java#460)
  • Fixed routing of simple callback with ptr-ptr arg (e.g. typedef void* (*F3)(int** pptr))
  • Fixed pointer casts in constants (issue nativelibs4java#132)
  • Fixed some GLib parsing issues: type literals of null TypeRefs, support signatures with va_list / __gnuc_va_list and __builtin_va_list, and fixed NPE (issue nativelibs4java#132)
  • Fixed parsing of exotic enums (issue nativelibs4java#459)
  • Fixed parsing of many Objective-C (property) attributes
  • Fixed case-sensitivity of C/C++ modifiers, which prevented some variables from being parsed (issue nativelibs4java#449)
  • Fixed parsing of unsigned long constants (issue nativelibs4java#362, issue nativelibs4java#374)
  • Fixed generation of raw bindings for callback return types (issue nativelibs4java#386)
  • Fixed generation of raw bindings with varargs (issue nativelibs4java#386, patch contributed by twitwi!)
  • Fixed generation of pointer to fake pointer for JNA target (issue nativelibs4java#403)
  • Fixed handling of library names with hyphens (issue nativelibs4java#260)
  • Fixed support of identifiers with Object method names (issue nativelibs4java#375)
  • Fixed support of enums inside objc classes (issue nativelibs4java#370)
  • Fixed parsing of @optional and @required objective-c annotations (issue nativelibs4java#369)
  • Fixed UTF32Char, added VOID, CHAR and byte as predefined types (issue nativelibs4java#363)
  • Fixed silent disappearance of struct field conversion errors (issue nativelibs4java#390)
  • Fixed pom files for Maven output modes (removed rococoa dependency by default, added commented repo needed by it)
  • Fixed resolution of typedef’d structs when the typedef name was chosen as “better” than the original struct tag (issue nativelibs4java#367)
  • Fixed restitution of hex constants (issue nativelibs4java#362)
  • Fixed parsing of restrict args
  • Fixed parsing of MinGW system headers (issue nativelibs4java#373)
  • Fixed wrong use of stdcall mapper outside Windows in JNAerator Runtime
  • Fixed recursive typedefs
  • Fixed typedefs of forward-declared enums and structs (issue nativelibs4java#430)
  • Fixed handling of large unicode values (issue nativelibs4java#401)
  • Fixed warnings for getFieldOrder (issue nativelibs4java#408)
  • Fixed handling of constant array sizes that depend on enums for BridJ (issue nativelibs4java#354)
  • Fixed handling of hypens in package names (issue nativelibs4java#260)
  • Fixed OSGi imports (issue nativelibs4java#429, thanks to Michael Werle for the pull request!) …

Special thanks to the users and bug reporters that helped getting this version out !

You can contribute to the project by reporting bugs here and joining the NativeLibs4Java Community.