Building
DuckDB provides a C++ based Extension Template which comes batteries-included. The template is configured with the package manager vcpkg, a SQL-based testing framework, and a GitHub Actions based CI/CD toolchain. The CI/CD chain will automatically build your extension for all supported DuckDB platforms including Linux, MacOS, Windows and WASM.
Publishing
To publish an extension in the DuckDB Community Repository, a Pull Request can be opened in the Community Repository. In the PR, a descriptor file needs to be specified containing all the relevant information of the extension, such as its source repository and version. Checkout the already existing community extensions for examples.
The Community Repository builds extensions using DuckDB's CI toolchain, this means that for your extension needs to be buildable with this toolchain. Fortunately, this is the exact same toolchain as is used by the Extension Template, so for extensions based on the template, this works out of the box.
Developer Documentation
With DuckDB's Community Extensions being a relatively new addition to the DuckDB ecosystem, there is currently limited developer documentation available. Information can be found in the following places:
However, because of the batteries-included nature of the extension template and the large amount or example extensions, extension development should be relatively straightforward.
Getting Help
For extension development related questions, there is a dedicated channel in the DuckDB Discord server. The Discord server is a great place to get help from other extension developers and the core DuckDB team. If you've found a bug or another type of issue with DuckDB, the extension template, or CI toolchain, please do just open an issue in the respective repository describing your issue. Of course if you're not sure, you can always first check in the Discord channel if it's a real issue or just you holding it wrong.