|
smollerGraph 0.20.2
A small graph database, from scratch
|
Accepted
Episode 1 looked at Neo4j, which is written in Java, and Kùzu, which is written in C++, and then at what smollerGraph should be. It said the database is going to be written in C++, "which is what Kùzu is written in, and what we used for nanoMMO", the MMO from another series on this channel. No episode weighs another language, so this record says what came with the choice rather than why it won.
ep001/step-1). The standard is required, so a compiler that can't do C++20 stops with an error instead of falling back to an older one, and the compilers' extensions are off. Episode 1 named designated initialisers and starts_with as what C++20 gives us.-Wall -Wextra -Wpedantic have been on since the first commit, "because they get more expensive
to fix the longer we wait"..cc and .h files, header guards named after the path, data members ending in an underscore, and a .clang-format based on Google's style, so nobody formats anything by hand. From episode 4, cpplint checks the guide and clang-tidy checks for bugs, as errors, in CI (0006).gtest_discover_tests registers each test with CTest (ep001/step-5). Abseil and cpp-httplib come the same way, each pinned to a release.tools/make_friends.cc, is C++ too (episode 3). The scripts around the database are Python, run with uv where they need packages: bench/compare.py (episode 3), tools/wikidata.py and bench/ui.py (episode 10), and tools/gnn.py (episode 15).bool and a string at first, and absl::Status from episode 4 (0009).<filesystem>, which it says lacks support for testing and has security problems. Until episode 4 the graph made its folder with std::filesystem, with an error code, as the guide doesn't use the exceptions it throws otherwise. From ep004/step-1, the graph and make_friends make their folders with mkdir, and the tests get a new folder from mkdtemp.CPPLINT.cfg leaves out the copyright check, as the licence is in LICENSE, and the check for includes without a folder, as the sources are all in src and include each other by name.CMAKE_CXX_SCAN_FOR_MODULES is off (episode 4).LoadFacts adds a fact's two nodes in statements of their own, which gives them ids in the order they're named on any compiler (episode 2).export is a word C++ keeps for modules, so the flag for sg export in main.cc is called to_folder (episode 15).