Nimgen is a helper for c2nim to simplify and automate the wrapping of C/C++ libraries.
It can be used to automate the process of manipulating C/C++ files so that c2nim can be run on them without issues. This includes adding/removing code snippets, removal of complex preprocessor definitions that c2nim doesn't yet comprehend and recursively running on #include files.
To see examples of nimgen in action check out the following wrappers:-
The nimgen README explains the various capabilities of the tool and the above examples also make it fairly obvious how it functions.
Thank you for evaluating nimgen and for your feedback, PRs and bug reports in advance!
Some other wrappers being considered are as follows. Feel free to reach out if you are interested in contributing or have opinions on which wrappers are of higher priority.
I have done wrappers for BLAS, LAPACK and CUDA using only c2nim and some manual work.
BLAS and LAPACK are ok and they are unlikely to change, but it would be nice if my CUDA wrappers could be automated using Nimgen (ideally in a backward compatible way), so that they could be kept up to date with newer CUDA releases.
on windows, nimgen will run something like
cmd /c "c2nim ..."
but I am using MSYS2+Mingw, thus "cmd /c" will make the command invalid. Is there a solution?