Closed asaaki closed 9 years ago
Thanks, I really appreciate you taking the time to clean this up. I need to work out building on Windows next, so it helps to have it in a much better state.
Yeah, regarding Windows support I have to rely totally on your feedback, because I just can work on Linux and Mac OSX. But I hope these changes do not break anything. :fingercrossed:
And thank you for this awesome tool, this saves a lot of time when playing around with C libraries! :bow:
Sorry, I have to propose further changes, but the gen task was not completely working for me.
Changes:
*) The NIF Elixir file will be created under
lib/<name>/nif.ex
to meet the general structure of a project. At least it makes more sense somehow from my POV.**) As you can see, I reduce the path from
priv/lib/lib_<file>
topriv/lib_<file>
. I think this is totally fine IMHO. Mostly this avoids confusion or even loading issues (one level less to care about).***) I would say it is considerably safer to let it crash instead of returning just a string here, especially in cases where the expected return type is a string, too. This could lead to hard to debug situations, therefore the
exit
with the given reason points to the real issue much quicker.I hope you like this proposal. So far this is the state where it does not fail anymore when I create the NIF stubs for a project.