This repo is the central build environment for all Smyte C++ projects. For documentation, issues, and code for the submodules in this project, please see each project's individual repo:
Smyte's C++ development is based on facebook's folly and wangle libraries to build high performance servers. The build system uses Google's bazel. By default, it builds a single executable binary that can be deployed to production directly.
bazel
, libssl-dev
, and libatomic1
.git submodule update --init
.bazel clean && bazel build ratelimit
. The first build may take a while to fetch all the third-party dependencies and build static libraries.Follow Google's C++ style guide with a few exceptions:
folly
and wangle
use it extensively.foo.addBack()
, instead of pascal case, which starts with a capital letter, e.g., foo.AddBack()
. The main reason is that both folly
and wangle
use camel case, and we want to be consistent. Note that rocksdb
uses pascal case because it is derived from Google's leveldb
code. While we also use rocksdb
heavily, we only use it as a library as supposed to involving it in the inheritance hierarchy.--filter=-legal/copyright,-build/c++11,
--linelength=120,
.cpp
instead of .cc
as extension for C++ souce code files. There is really no difference between the two. Google uses .cc
, and its build rule is also called cc_binary
for example. But we'd rather be consistent with the main facebook C++ libraries.BasedOnStyle: Google
ColumnLimit: 119
DerivePointerAlignment: false
PointerAlignment: Left
AccessModifierOffset: -1
To run all tests, simply execute bazel test //...:all
.