sudo bash ./bootstrap.sh
settings.json
{
"C_Cpp.default.compileCommands": "${workspaceFolder}/compile_commands.json"
}
compile_commands.json
bazel run @wolfd_bazel_compile_commands//:generate_compile_commandsor
bazel run compile_commandsfind . \( -name "*.h" -o -name "*.cpp" \) -print0 | xargs -0 clang-format -i
How to Compiler this project.
bazel clean --expunge
bazel mod tidy
bazel build //sdk/...How to run unit tests by target.
bazel test //sdk/container/tests:segment_tree_test
# If need more info
# bazel test --test_verbose_timeout_warnings --test_output=all //sdk/container/tests/...How to run all unit tests.
bazel test //...
How to run benchmark by target.
bazel run -c opt //sdk/benchmark/segment_tree:segment_tree_benchmark_no_simd
bazel run -c opt //sdk/benchmark/segment_tree:segment_tree_benchmark_simd
bazel run -c opt //sdk/benchmark/ringbuffer:spsc_ringbuffer_benchmarkNote: If you run a Bazel target without "-c opt", Bazel will build a debug binary or library by default. Add "-c opt" to build with release (optimized) settings for accurate.