In case anyone else has had their attention drawn to @Aurel300’s ammer
library, I’ve put together a class you can call from an initialization macro that works quite well for Windows.
I haven’t tested for other platforms, but presumably, if the build process works on your platform, it will work for others on the same platform (see #30).
If you’re a library author, and you want to distribute native extensions built with ammer
, you should try anvil
.
Both projects are both at version 0.0.1, hopefully that answers any questions about production readiness
But, it works quite well, and I’ve gotten it to work on two different rigs of very different calibers so I’m optimistic.
ammer
will build your stub code provided some preconditions are met (the native library the stub code relies on has been built and is in a place that is accessible to the user’s output directory).
anvil
essentially takes care of those preconditions by asking 3 questions:
- What’s your native library called (what does
ammer
know it as) - Where’s your native library located (relative to the project root directory)
- What build command will you run (usually you will include a
Makefile
or aCMakeLists.txt
and use something likenmake
orcmake
)
What anvil
does not do:
- Create
Makefiles
orCMakeLists.txt
(or in any way reason about how to build the c files, it simply runs a command, that command should produce binaries, whatever restrictions that may come with for the user, in my case, you have to be using Windows and you need the MSVC toolchain) - Facilitate any cross-platform usage of an
ammer
library: If the native extension isn’t cross-platform, anvil won’t change that.