Git Product home page Git Product logo

Comments (6)

ysbaddaden avatar ysbaddaden commented on May 22, 2024

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.

from shards.

technorama avatar technorama commented on May 22, 2024

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.

from shards.

kostya avatar kostya commented on May 22, 2024

what if always call make shard when install new shard, and if user create that task in Makefile, it would be executed (compile some static c libs or something)

from shards.

ysbaddaden avatar ysbaddaden commented on May 22, 2024

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 postinstall but there could be others, like pre/post upgrade.

from shards.

ysbaddaden avatar ysbaddaden commented on May 22, 2024

@technorama I just implemented the postinstall script in #19, tell me if it fits your needs.

from shards.

ysbaddaden avatar ysbaddaden commented on May 22, 2024

Closing since #19 got merged.

from shards.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.