Local env
Requirements
- Linux, x86-64 or ARM64.
- Nix with flakes enabled. The dev shell brings everything else: the .NET 10
SDK, MariaDB, clang (for the native AOT build),
perf, the .NET profiling tools andmdbook. - About 80 GB of free disk for the dumps and the database (see Size of the data).
- About 8 GB of RAM for the MariaDB buffer pool. You can change this, see Local database.
Enter the dev shell
nix develop
The shell sets WPATH_DB_DIR to .mariadb/ at the root of the repository and MYSQL_UNIX_PORT to
the socket inside it. Every command that talks to MariaDB uses these values by default.
Build a graph from scratch
Run these commands from the root of the repository. By default, every file goes into dumps/.
db-start # start the local MariaDB
dotnet run --project WikipediaPath.GraphBuilder -- download
dotnet run --project WikipediaPath.GraphBuilder -- decompress
dotnet run --project WikipediaPath.GraphBuilder -- provision # takes hours
dotnet run --project WikipediaPath.GraphBuilder -- build
The result is dumps/graph.wgrf. The pipeline page explains each step.
You can also build the native binary once and call it directly:
nix build
./result/bin/WikipediaPath.GraphBuilder --help
Or run it without a checkout:
nix run . -- --help
Use the graph
dotnet run --project WikipediaPath.GraphBuilder -- info
dotnet run --project WikipediaPath.GraphBuilder -- path "Tour Eiffel" "Pikachu"
dotnet run --project WikipediaPath.GraphBuilder -- explore "Pikachu" --max-depth 1
These commands only need the .wgrf file. They don’t need MariaDB.
Read this book locally
mdbook serve docs --open