Skip to content

Files

Latest commit

a61ade2 · Oct 15, 2024

History

History
51 lines (37 loc) · 1.63 KB

README.md

File metadata and controls

51 lines (37 loc) · 1.63 KB

Basic Data Structures in C

This repository contains reference implementations for various basic data structures in C. The public interfaces are intentionally incomplete to encourage the reader to fill in the blanks and implement their own extensions.

Running the Code

This project uses the CMake (v3.30+) build system generator for cross-platform builds. I personally prefer the multi-configuration Ninja (v1.12+) build system, but feel free to use your system's default (e.g., Microsoft Visual Studio Compiler, Xcode, and Make).

For convenience and widest compatibility, we use the Just (v1.35+) task runner with the cross-platform Nushell (v0.97+) shell to run common commands. However, it is totally possible to run the raw commands yourself. Consult the justfile for more details.

# Generate the build system configurations in `.build/`
just config

# Build all targets in debug mode
just build

# Build all targets in release mode (if supported by the generator)
just build Release

# Run all unit tests
just test

Linting the Codebase

# Run Clang Format as the formatter.
just fmt     # check
just fix-fmt # fix

# Run Clang Tidy as the linter.
just lint     # check
just fix-lint # fix