gitmyhub

quack

Shell ★ 3 updated 2y ago

A starter template for building DuckDB extensions, pre-configured project structure, example code, tests, and automated multi-platform builds.

C++ShellDuckDBGitHub ActionsAmazon S3setup: moderatecomplexity 4/5

What This Repository Does

This is a starter template for people who want to build their own extensions for DuckDB, which is a database engine. Think of extensions like plugins or add-ons—they let you add new features to DuckDB without modifying the core software. If you've ever installed a browser extension to add functionality you needed, this is the database equivalent.

The template saves you from having to build everything from scratch. Instead of figuring out how to structure your code, set up builds, and integrate with DuckDB, you can clone this repo and start writing your custom feature right away. It comes with example code, testing tools, and instructions for distributing your extension so others can use it too.

How It Works

When you use this template, you get a pre-configured project structure with all the plumbing already in place. You write your extension code (new functions, data types, or capabilities), and the template's build system compiles it into something DuckDB can load. The README includes a simple example: a function called quack() that takes text and returns it with a duck emoji. This shows you exactly where to put your code and how to test it. You can run the extension locally using the DuckDB shell, and there are automated tests you can write in SQL to verify your work.

For distribution, the template includes GitHub workflows that automatically build your extension for different operating systems and architectures, then upload the binaries to cloud storage (Amazon S3). Once set up, anyone can install your extension by pointing DuckDB to your repository, similar to how you'd install a package from an app store.

Who Would Use This

Database developers or data engineers who want to extend DuckDB's functionality would use this. Common use cases include adding specialized SQL functions for your industry, integrating with proprietary data formats, or optimizing queries for specific workloads. A data team at a startup might build a custom extension to connect DuckDB directly to their internal data pipeline. A researcher might create one to add statistical functions needed for their analysis.

The template is designed to be approachable—you don't need deep database internals knowledge, though some C++ experience helps. The project includes clear setup instructions and points to example extensions you can study for inspiration.

Where it fits