Repository navigation
Description
Problem
A fresh flAPI downloads its default DuckDB extensions (httpfs, ducklake, fts, postgres, sqlite; ~50 MB per platform) from extensions.duckdb.org on first start. That costs start-up time (measured on 2.0.1: first start with an empty extension directory 1.8 s, of which the download is almost all), needs outbound network at runtime, and makes air-gapped and serverless deployments depend on FLAPI_EXTENSION_DIRECTORY + FLAPI_EXTENSIONS_OFFLINE being set up by hand. flapi pack --with-extensions already embeds extensions, but only in a binary the user builds.
Context from the DuckDB 2.0 upgrade (#241): core_functions, parquet, json and icu are now linked into the binary; extensions are published per DuckDB version (v2.0.1/<platform>/), so any shipped copy must be refreshed with every DuckDB bump.
Options
| A. Ship with releases | B. Link into the binary | C. Pack by default | |
|---|---|---|---|
| What | release archives, wheels and the Docker image carry extensions/v<duckdb>/<platform>/ next to the binary; flapi picks it up automatically (before the user dir, after FLAPI_EXTENSION_DIRECTORY) |
build httpfs, ducklake, fts, postgres, sqlite statically (out-of-tree extension builds) | flapi pack embeds the config's extensions unless --without-extensions; document a pre-populated dir for Docker |
| Download at runtime | only for extensions outside the default set | never for the defaults | only for unpacked binaries |
| Works offline out of the box | yes | yes | only packed binaries |
| Release size | +50-80 MB per platform archive/wheel (signed .duckdb_extension files) | binary +40-70 MB (estimate) | unchanged |
| CI cost | low: download + verify signatures in the release job | high: out-of-tree builds on 4 platforms (postgres needs libpq/OpenSSL), longer builds, extension patches per DuckDB bump | none |
| Extension bug fix without a flapi release | user can INSTALL ... FORCE into the user dir, or flapi release |
needs a flapi release | user can re-pack |
| Signature check | kept (official signed files) | n/a (compiled in) | kept |
| Risk | dir lookup order and version mismatch must be tested | build complexity, ABI coupling | small |
Recommendation (for discussion)
A, with C as a cheap complement: releases (archives, wheels, Docker) carry the signed default extensions for their DuckDB version and platform; flapi uses them read-only and never writes there; downloads stay possible for anything else unless offline. B only if a deployment target cannot carry files next to the binary.
Tests (real binary)
- Fresh host, no network (
docker run --network none, empty HOME): every default extension loads from the shipped dir, startup does no network I/O. FLAPI_EXTENSION_DIRECTORYstill wins; a user-installed newer copy wins over the shipped one (or not: decide).- Version mismatch (shipped dir for another DuckDB version) is ignored with one clear log line.
- Wheel install (
pip install flapi-io) finds the dir inside the package. flapi pack --with-extensionsand the shipped dir do not double-load.
Activity
feat: Load DuckDB extensions shipped next to the flapi binary (#245)
ci: Release archives, wheels and Docker images carry the default exte…
docs: Shipped extensions, lookup order and stripped binaries (#244, #245
ci: flapi-io wheels ship without extensions (#245)
Merge #244/#245: stripped binaries, extensions shipped with releases
test: Offline bootstrap message wording after the extension lookup ch…
fix: Shipped-extension checks run only what can run; macOS quarantine…
docs: Reword the deploy skill so the checker does not read a command (#…