Giter Club home page Giter Club logo

Comments (3)

p0deje avatar p0deje commented on June 26, 2024

As documented here, for example
https://github.com/sparklemotion/nokogiri#native-gems-faster-more-reliable-installation
there's a way to start from a pre-compiled native gem instead. I think most Bazel users should be using this to achieve reproducible builds.

That's only available for certain gems like nokogiri. For pysch, we could potentially install libyaml and follow the steps in https://github.com/ruby/psych#installation to point to use it instead of system libyaml.

How does other rules (node/python) handle installation that expects certain libraries in the system?

from rules_ruby.

alexeagle avatar alexeagle commented on June 26, 2024

Node.js and Python rules do a poor job of this as well. You have three choices:

  1. custom wiring with cc_library to replace the package manager's build system with Bazel, and figure out how to stitch the result into how the ruleset gets its third-party libraries. Pretty much no one knows how to do this although it feels ilke the principled answer
  2. just let the package manager's build system do its thing and deal with non-hermeticity. 90% of bazel users do this.
  3. use a pre-compiled binary package for your platform. In cases where upstream maintainers don't ship one, build one yourself and put into artifactory or some custom registry. The sophisticated 10% do this

Random note, the native build system used under Node.js is GYP and they considered using Bazel to implement it at one point

from rules_ruby.

p0deje avatar p0deje commented on June 26, 2024

If you're on a supported platform, either gem install or bundle install should install a native gem without any additional action on your part. This installation should only take a few seconds, and your output should look something like:

Native gems are selected during installation time automatically by RubyGems. We can't really force that. Let's for now stick to option 2.

from rules_ruby.

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.