I'm trying to make some improvements to nim-platformio, a tool that makes it easy to cross-compile nim to microcontrollers. One of the needs is to have nimbase.h in the project's include path. The current solution keeps a copy of nimbase.h in the tool-author's git repository. This solution means that there is potential for the supplied nimbsae.h to be out-of-sync with the user's nim compiler.- Does nimbase.h change that often?
- If I deployed a set of nimbase.h copies, one for every major.minor release of nim, do you think that would be close enough for most cases?
If that doesn't work:
- What would be a reliable way for me to programmatically find the nimbase.h on a user's system? For windows, I installed nim from the nim-lang.org website and see that nimbase.h is a relative offset from the nim.exe that is found via PATH. However, on a mac, I installed nim via homebrew and there is no nimbase.h that I can find from that installation.
An added wrinkle here is that platformIO is a python-based tool, so I will be implementing this solution in Python (though I can call nim via a system() call). Thankfully I have loads of Python experience.