GithubHelp home page GithubHelp logo

rockwood-openai / rules_boost Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nelhage/rules_boost

0.0 0.0 0.0 657 KB

bazel build rules to use boost in bazel projects

License: Apache License 2.0

C++ 70.09% Starlark 29.91%

rules_boost's Introduction

rules_boost -- Bazel build rules for Boost

Copy this into your Bazel MODULE.bazel file to add this repo as an external dependency, making sure to update to the latest commit per the instructions below.

# Boost
# Famous C++ library that has given rise to many new additions to the C++ Standard Library
# Makes @boost available for use: For example, add `@boost//:algorithm` to your deps.
# For more, see https://github.com/nelhage/rules_boost and https://www.boost.org
bazel_dep(name = "rules_boost", repo_name = "com_github_nelhage_rules_boost")
archive_override(
    module_name = "rules_boost",
    urls = "https://github.com/nelhage/rules_boost/archive/refs/heads/master.tar.gz",
    strip_prefix = "rules_boost-master",
    # It is recommended to edit the above URL and the below sha256 to point to a specific version of this repository.
    # integrity = "sha256-...",
)

non_module_boost_repositories = use_extension("@com_github_nelhage_rules_boost//:boost/repositories.bzl", "non_module_dependencies")
use_repo(
    non_module_boost_repositories,
    "boost",
)

You can now use libraries in deps through the @boost repository, for example @boost//:algorithm.

If you're using the Apple or Android-specific rules...

As with all platform-dependent C/C++ in Bazel, you'll need to use Bazel 7+ (and a similarly recent version of rules_apple) for per-platform configuration to work automatically out of the box. (Please file a PR to delete this section if Bazel 7 is now so old as to be standard.)

Suggestion: Updates

Improvements come frequently to the underlying libraries, including security patches, so we'd recommend keeping up-to-date.

We'd strongly recommend you set up Renovate (or similar) at some point to keep this dependency (and others) up-to-date by default. [We aren't affiliated with Renovate or anything, but we think it's awesome. It watches for new versions and sends you PRs for review or automated testing. It's free and easy to set up. It's been astoundingly useful in our codebase, and we've worked with the wonderful maintainer to make things great for Bazel use. And it's used in official Bazel repositories--and this one!]

If not now, maybe come back to this step later, or watch this repo for updates. [Or hey, maybe give us a quick star, while you're thinking about watching.] Like Abseil, we live at head; the latest commit to the main branch is the commit you want. So don't rely on release notifications; use Renovate or poll manually for new commits.

Configuration of Sub-Libraries

ASIO

SSL Support

These rules implement support for Boost ASIO's SSL support. To use ASIO-SSL, you must depend on the "@boost//:asio_ssl" target, instead of "@boost//:asio". ASIO-SSL depends on OpenSSL; By default, rules_boost will download and build the latest BoringSSL commit; To use a different OpenSSL implementation, create a remote named openssl before calling boost_deps. This remote must make available OpenSSL's libssl at @boringssl//:ssl.

io_uring support

To enable io_uring for asio, use --@boost//:asio_has_io_uring. Optionally, pass--@boost//:asio_disable_epoll to use io_uring for all operations.

Beast

Boost Beast uses beast::string_view for things like request/response headers, which by default is a type alias of boost::string_view. If you're using a C++17 compiler that supports std::string_view you can use --@boost//:beast_use_std_string_view to make beast::string_view instead be a type alias of std::string_view.


Based in part on rules from https://github.com/mzhaom/trunk.

rules_boost's People

Contributors

renovate[bot] avatar nelhage avatar cpsauer avatar vertexwahn avatar drigz avatar wijagels avatar per-gron avatar gjasny avatar russelltg avatar zacvawterkodiak avatar eklitzke avatar markusteufelberger avatar kamalmarhubi avatar andrewrademacher avatar garymm avatar hackattack avatar dprogm avatar richardcochrankodiak avatar sschnug avatar asa avatar mapx avatar wesleyw72 avatar thebutlah avatar philwo avatar storypku avatar an-to-nio avatar henryymliu avatar finn-ball avatar benjaminp avatar akovachev avatar

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.