C++17 implementation of blockchain based digital storage
Filecoin is a decentralized protocol described in spec
All C++ dependencies are managed using Hunter. It uses cmake to download required libraries and do not require to download and install packages manually. Target C++ compilers are:
- GCC 7.4
- Clang 6.0.1
- AppleClang 11.0
C++ Filecoin implementation uses Rust libraries as dependencies for BLS provider.
All you need to build these targets successfully - is Rust lang installed to your ${HOME}/.cargo/bin
.
You can do it manually following the instructions from rust-lang.org or any other way.
Otherwise, CMake would not be able to compile Rust-related targets and will produce a warning about that during configuration.
To clone repository execute
git clone https://github.com/filecoin-project/cpp-filecoin.git
cd cpp-filecoin
git submodule update --init --recursive
First build will likely take long time. However, you can cache binaries to hunter-binary-cache or even download binaries from the cache in case someone has already compiled project with the same compiler. To this end, you need to set up two environment variables:
GITHUB_HUNTER_USERNAME=<github account name>
GITHUB_HUNTER_TOKEN=<github token>
To generate github token follow the instructions. Make sure read:packages
and write:packages
permissions are granted (step 7 in instructions).
This project is can be built with
mkdir build && cd build
cmake -DCLANG_TIDY=ON ..
make -j
It is suggested to build project with clang-tidy checks, however if you wish to omit clang-tidy step, you can use cmake ..
instead.
Tests can be run with:
cd build
ctest
We follow CppCoreGuidelines.
Please use provided .clang-format file to autoformat the code.
Maintainers: @kamilsa, @zuiris, @harrm, @masterjedy, @Mingela, @Warchant
Tickets: Can be opened in Github Issues.