ammer-core
ammer-core
is a macro library that forms the foundation of ammer
. Its main function is to allow each ammer
target to be compiled and linked to C functions. To achieve this:
- For each
ammer
target:- It generates code that contains the C functions, along with any glue code required by the target's FFI mechanism.
- In each function, it marshals data from the target's native representation to its C counterparts.
- It defines a sequence of build steps that compiles the generated glue code, including any headers and dynamic libraries required by the target's FFI mechanism.
- For each build system:
- It executes the sequence of build steps by invoking the concrete compiler/linker with appropriate arguments.
The API of ammer-core
is quite low-level and stays quite close to the C counterparts. Notably, ammer-core
does not map Haxe classes and types to native libraries, it does not assume that there is a single dynamic library being defined, and it does not process metadata or defines: these are all handled by ammer
.