ammer

Why ammer?

Diagram: ammer overview ammer Haxe code C++ HashLink Java ... hxcpp HL runtime JVM ... C externs HL FFI JNI ... native library

Unlike Haxe externs and manually written glue code, ammer definitions provide a unified interface: the same definition can be used for C++, for HashLink, for Node.js, etc. Additionally, writing externs and glue code is extremely error-prone and tedious, and requires detailed knowledge of the FFI mechanism used by each platform. ammer aims to hide this technical complexity, allowing library authors to focus purely on the API of the library they are defining. Any necessary externs and glue code is generated automatically. Any issues that are identified in this process can be fixed once, to the benefit of all ammer libraries.

ammer can be seen as an extension of the "Haxe promise": write code once and run it anywhere. With ammer this is true also for code that interacts with native libraries, which is crucial for real-world codebases.

« Previous: Terminology Next: Installation »