vweevers / napi-functions

List the N-API functions used in c/c++ source code.
MIT License
0 stars 0 forks source link

macro support #1

Open mafintosh opened 4 years ago

mafintosh commented 4 years ago

Unfortunately tree-sitter doesn't seem to work with macros which I use in all my projects. I did get inspired by this tho and made this little fellow, https://github.com/mafintosh/minimum-napi-version that uses the binary compiled to figure out the minimum version needed.

Maybe some of the techniques in there with getting the versions from the docs can be used here also?

vweevers commented 4 years ago

doesn't seem to work with macros

Right. Can we assume that napi-macros will only include "basic" napi functions, not new experimental functions? Because if so, we could check if you have napi-macros in dependencies and then include all the napi functions it uses (perhaps exported as a list by napi-macros).

the binary compiled to figure out the minimum version needed

Don't we need to know the minimum version before we can compile?

vweevers commented 4 years ago

If it weren't for the fact that it's written (read: cobbled together) in rust, this would be a viable replacement for nm: https://github.com/vweevers/global-symbols

mafintosh commented 4 years ago

@vweevers i just compile twice :D