duckdb/duckdb
Dependencies
DuckDB has no required runtime dependencies outside the C++17 standard library. Everything else is vendored as source under third_party/. This makes the engine easy to embed and easy to build for unusual targets (Wasm, Android, embedded systems).
Vendored libraries
| Directory | Library | Purpose |
|---|---|---|
third_party/brotli/ |
Brotli | Optional compression codec for parquet writes. |
third_party/catch/ |
Catch2 | Test framework for the C++ test suite. |
third_party/concurrentqueue/ |
moodycamel::ConcurrentQueue | Lock-free queue used in the task scheduler. |
third_party/fast_float/ |
fast_float | Fast string-to-float parsing used by the CSV scanner. |
third_party/fastpforlib/ |
FastPFOR | Bit-packed integer compression used by parquet. |
third_party/fmt/ |
fmt | Formatting library used in error messages. |
third_party/fsst/ |
FSST | String compression (DuckDB-developed). |
third_party/httplib/ |
cpp-httplib | Used by extensions only (httpfs); engine itself does not depend on HTTP. |
third_party/hyperloglog/ |
HyperLogLog | Approximate distinct counting. |
third_party/imdb/ |
IMDb data | Test fixtures for join-order benchmarks. |
third_party/jaro_winkler/ |
jaro-winkler | Implementation of the jaro_winkler similarity function. |
third_party/lz4/ |
LZ4 | Compression codec; used by parquet's LZ4_RAW. |
third_party/mbedtls/ |
mbed TLS | Crypto primitives (AES, hashes, X.509). |
third_party/miniz/ |
miniz | Minimal zlib/deflate implementation; used for gzip-compressed inputs. |
third_party/parquet/ |
Apache Parquet C++ headers | Thrift schema for parquet metadata. |
third_party/pcg/ |
PCG | Pseudo-random number generator. |
third_party/pdqsort/ |
pdqsort | Pattern-defeating quicksort used internally. |
third_party/re2/ |
RE2 | Regex engine used by regexp_* functions. |
third_party/ska_sort/ |
ska_sort | Radix sort variant. |
third_party/skiplist/ |
skip list | Used in the optimizer/window code. |
third_party/snappy/ |
Snappy | Compression codec for parquet. |
third_party/snowball/ |
Snowball stemmer | Optional FTS support. |
third_party/tdigest/ |
t-digest | Approximate quantiles. |
third_party/thrift/ |
Apache Thrift | Subset for parquet metadata serialization. |
third_party/utf8proc/ |
utf8proc | UTF-8 normalization and case folding. |
third_party/vergesort/ |
vergesort | Adaptive sort variant. |
third_party/yyjson/ |
yyjson | Fast JSON parser used by the JSON extension. |
third_party/zstd/ |
Zstandard | General-purpose compression; used in many places. |
third_party/pegtl/ |
PEGTL | PEG parser combinator framework powering the SQL grammar. |
PEGTL is at third_party/pegtl/ and is the engine for src/parser/peg/.
Optional (extension-only) dependencies
These are pulled in only when the relevant extension is built:
| Extension | External source | Notes |
|---|---|---|
parquet |
none extra (Thrift + Snappy + ZSTD vendored) | Built-in. |
json |
yyjson (vendored) | Built-in. |
icu |
Vendored ICU subset (extension/icu/third_party/) |
Replaces system ICU. |
delta |
delta-kernel-rs (Rust) | Fetched at build time; requires Rust. |
tpch / tpcds |
Vendored dbgen / dsdgen | Built-in. |
httpfs (out-of-tree) |
mbedtls + cpp-httplib | Out-of-tree; pulls from this repo's vendored libs. |
aws (out-of-tree) |
aws-sdk-cpp | Out-of-tree. |
iceberg (out-of-tree) |
Avro + JSON | Out-of-tree. |
Build-time dependencies
| Tool | Required for |
|---|---|
| C++17 compiler (GCC 7+, Clang 6+, MSVC 2019+) | Building the engine. |
| CMake 3.5+ | Configuring the build. |
| Python 3 | Code generation scripts in scripts/, the test runner. |
Optional: clang-format 11.0.1 |
make format-fix. |
Optional: black |
make format-fix (Python). |
Optional: ninja |
Faster builds with GEN=ninja make. |
Optional: ccache |
Auto-detected for faster rebuilds. |
| Optional: Rust toolchain | Building the delta extension. |
The amalgamation build (scripts/amalgamation.py) produces a single duckdb.cpp plus header that has only the C++ standard library as a dependency — used for embedding in environments where pulling in CMake is impractical.
Vendoring policy
DuckDB vendors third-party dependencies on principle. The reasons:
- Determinism. A given commit always builds the same way, regardless of system libraries.
- Portability. WASM, Android, and minimal Linux containers do not always ship system libraries.
- Single-binary embedding. The amalgamation build produces a
.cppfile with no other dependencies.
When updating a vendored library, the workflow is in scripts/ (e.g., extension/icu/scripts/ for ICU updates). Patches are applied as part of the import.
Where to look
- The vendor list in any one place:
third_party/(this directory). - Per-extension vendored sources:
extension/<name>/third_party/(e.g.,extension/icu/third_party/). - License notices: each
third_party/<name>/LICENSE(or equivalent).
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.