-
-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for c libraries. #15
Comments
Could you detail your problem and use case before jumping to potential solutions? I'd like to understand what's actually needed beforehand. It may involve a bunch of problems, like checking for the presence of a library, downloading, compiling, making the lib available to Crystal when linking, etc. |
Use case #1: I want to use an existing library but need a few C functions added. As far as I know the only way to use them is by compiling a library and linking it using the crystal provided c bindings. Use case #2 (similar to above): I have a small library in my git repository that must be compiled before crystal build is run. Crystal c bindings are used to access the library. |
what if always call |
Thanks for the use cases. We could have some hook commands to be run when an action is performed. For example: scripts:
postinstall: "cd ext && make" The most obvious is |
Dependencies may now have a post install script hook that will be run whenever the dependency is installed or updated: - scripts: - postinstall: "cd ext && make" refs #15
@technorama I just implemented the postinstall script in #19, tell me if it fits your needs. |
Closing since #19 got merged. |
One possible way to add c library support:
The text was updated successfully, but these errors were encountered: