OpenDAL provides a pre-configured dev container that could be used in GitHub Codespaces, VSCode, JetBrains, JupyterLab. Please pick up your favourite runtime environment.
The fastest way is:
To build OpenDAL C binding, the following is all you need:
A compiler that supports C11 and C++14, e.g. clang and gcc
To format the code, you need to install clang-format
opendal.h is not formatted by hands when you contribute, please do not format the file. Use make format only../tests, you may format it before submitting your pull request. But notice that different versions of clang-format may format the files differently.GTest(Google Test) need to be installed to build the BDD (Behavior Driven Development) tests. To see how to build, check here.
For Ubuntu and Debian:
# install C/C++ toolchain sudo apt install -y build-essential # install clang-format sudo apt install clang-format # install and build GTest library under /usr/lib and softlink to /usr/local/lib sudo apt-get install libgtest-dev cd /usr/src/gtest sudo cmake CMakeLists.txt sudo make sudo cp lib/*.a /usr/lib sudo ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a
To build the library and header file.
mkdir build && cd build cmake .. make
opendal.h is under ./include../../target/debug after building.To clean the build results.
cargo clean cd build && make clean
To build and run the tests. (Note that you need to install GTest)
cd build make tests && ./tests
The documentation index page source is under ./docs/doxygen/html/index.html. If you want to build the documentations yourself, you could use
# this requires you to install doxygen make doc