• Stars
    star
    287
  • Rank 144,232 (Top 3 %)
  • Language
    C++
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated 28 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

bazel build rules to use boost in bazel projects

rules_boost -- Bazel build rules for Boost

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

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

# 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
http_archive(
    name = "com_github_nelhage_rules_boost",

    # Replace the commit hash in both places (below) with the latest, rather than using the stale one here.
    # Even better, set up Renovate and let it do the work for you (see "Suggestion: Updates" in the README).
    url = "https://github.com/nelhage/rules_boost/archive/96e9b631f104b43a53c21c87b01ac538ad6f3b48.tar.gz",
    strip_prefix = "rules_boost-96e9b631f104b43a53c21c87b01ac538ad6f3b48",
    # When you first run this tool, it'll recommend a sha256 hash to put here with a message like: "DEBUG: Rule 'com_github_nelhage_rules_boost' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = ..."
)
load("@com_github_nelhage_rules_boost//:boost/boost.bzl", "boost_deps")
boost_deps()

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 set up platform_mappings until Bazel resolves its outstanding issues.

It's not hard if you know what to to do, but can be tricky to figure out. If you'd like help with this, please let us know over at hedronvision/bazel-make-cc-https-easy#4

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 @openssl//: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.

More Repositories

1

reptyr

Reparent a running program to a new terminal
C
5,339
star
2

llama

Go
585
star
3

gojit

JIT code-generation in Go!
Go
338
star
4

ministrace

A minimal toy implementation of strace(1)
C
161
star
5

reverse-android

Reverse-engineering tools for Android applications
Emacs Lisp
55
star
6

taktician

An implementation of and AI for the game of Tak
Go
55
star
7

elisp

nelhage's emacs configuration
Emacs Lisp
47
star
8

bemu

A just-in-time compiler for MIT 6.004's "Beta" processor.
C++
36
star
9

virtunoid

My KVM breakout code from my DEFCON/Black Hat 2011 presentation
C
35
star
10

transformer-rs

A sketch of a Transformer in Rust for a blog post
Rust
28
star
11

ultimattt

A Rust Implementation of Ultimate Tic Tac Toe
Rust
23
star
12

crossme

A collaborative crossword-puzzle solver written on Meteor
JavaScript
23
star
13

util-scripts

~/bin/
Shell
14
star
14

pw

My personal GPG-based password manager
Go
13
star
15

nullderef

A module for playing with kernel NULL pointer dereferences
C
11
star
16

iron-blogger

Code to run the Iron Blogger event.
Python
9
star
17

re2

A git mirror of Russ Cox's re2 regular-expression library
C++
9
star
18

s3multiget

Some benchmarks of S3 multigets
Go
9
star
19

aoc2023

Advent of Code 2023
C++
9
star
20

x11-proxy

8
star
21

git-merge-rename

A Dropbox-inspired git merge strategy that never fails
Shell
8
star
22

jsbeta

An emulator for 6.004's Beta processor for the browser.
JavaScript
8
star
23

plv8js

Fork of http://code.google.com/p/plv8js
C++
8
star
24

github-downloader

Scripts to download all of github. Or at least much of it.
Python
7
star
25

librstpreload

A LD_PRELOAD library to make any app support Random Standard Time.
C
6
star
26

go.cli

Some utilities for writing CLIs in go.
Go
6
star
27

ghostscript-afl

fuzzing ghostscript with AFL
C
5
star
28

kernel-workshop

demo kernel modules for a workshop at recurse center
C
5
star
29

blog.nelhage.com

blog.nelhage.com
JavaScript
5
star
30

tf-experiments

some experiments with tensorflow and tf on ec2
Python
5
star
31

rules_fuzzer

bazel+libfuzzer
Python
4
star
32

barnowl-zstatus

Z-Status module for BarnOwl
Perl
4
star
33

check-plus

A simple EDSL for testing C code using Check
C
4
star
34

flnv

nelhage's experimental toy scheme implementation
C
3
star
35

chef-config-nelhage

chef config for my personal infrastructure
Python
3
star
36

barnowl-devutils

DevUtils module for BarnOwl
Perl
3
star
37

barnowl-alias

Alias module for BarnOwl
Perl
2
star
38

coop

A Coq playground
Coq
2
star
39

iron-gollum

Rust
2
star
40

authmitedu

Code for auth.mit.edu OpenID provider
Perl
2
star
41

gollum

A toy typed lambda-calculus
Go
2
star
42

mitua

2
star
43

barnowl-modules

Superrepo for my BarnOwl modules
2
star
44

data-sexpression

A perl S-Expression parser
Perl
2
star
45

snb

Sexy Nerd Bot - A bot for the MIT prefrosh chat room
2
star
46

accidentallyquadratic

I accidentally an nΒ²
Python
2
star
47

barnowl-vt-asedeno

VT_ASedeno style for BarnOwl
Perl
2
star
48

bazel_git_repositories

Implementation of bazel `git_repository` remotes using Skylark
Python
2
star
49

hszephyr

Haskell libzephyr bindings
Haskell
2
star
50

claude

Scrappy CLI for Claude
Go
2
star
51

duckdb-parquet-bugs

Parquet files and generators for some DuckDB parquet bugs
Go
2
star
52

HIBP-reader

reader for HIPB sha files
Python
1
star
53

Ascension

Jifty webapp to track progress in nethack
Perl
1
star
54

arduinoproject

aggregator of random arduino projects
Assembly
1
star
55

tlaplus-sandbox

toying with TLA+
TLA
1
star
56

minimax.dev

Hugo site for https://minimax.dev/
HTML
1
star
57

brainfuck

Don't you have your own repository of brainfuck programs?
Brainfuck
1
star
58

magit

A magit fork with fixes/changes/hacks I've found useful.
Emacs Lisp
1
star
59

iobench

Some mostly-one-off IO benchmark scripts
C++
1
star
60

party-zephyr

A partychat<->Zephyr bridge
Python
1
star
61

proc-maps-bench

some benchmarking experiments related to /proc/$pid/maps
C++
1
star
62

godis86

golang wrapper for udis86
C
1
star
63

mode13h

Some code I wrote back in high school for doing graphics using VGA Mode 13h
C
1
star
64

mongod-tests

Framework for writing mongod tests and reproducers
Python
1
star
65

haskell-hunt

Various Haskell utilities to help with solving Mystery Hunt puzzles
Haskell
1
star
66

langer

C
1
star
67

xformer

Some toy transformer implementations
Python
1
star
68

rubik

Rubik's Cube implementation and experiments
C++
1
star
69

aoc2021

Advent of Code 2021
Julia
1
star
70

asciisnowmanforyou.com

http://asciisnowmanforyou.com
HTML
1
star
71

Text-Index-Database

An old attempt at writing my own full-text indexing solution
Perl
1
star