A modern Rust template for developing DuckDB extensions with improved developer experience compared to the official template.
- Modern Rust Support: Supports Rust 2024 Edition and newer Rust versions (official template only supports Rust 2021 Edition)
- Simplified Toolchain: Only requires Rust toolchain - no need for Python, Python3-venv, make, or git (official template requires additional tools)
- Native Rust Experience: Uses Rust-developed Cargo plugins instead of Python scripts for packaging, providing better performance and more native Rust development workflow
- Build Quack Extension
# 1. Install template generator
cargo install cargo-generate
# 2. Generate extension project: change quack to your project name
cargo generate --git https://github.com/redraiment/duckdb-ext-rs-template -n quack
# 3. Enter project folder
cd quack
# 4. Install DuckDB extension development tools
cargo install cargo-duckdb-ext-tools
# 5. Build quack extension
cargo duckdb-ext-build- Test Quack Extension
duckdb -unsigned -c "load 'target/debug/quack.duckdb_extension'; from quack('Joe')"If the build is successful, you should see:
┌───────────┐
│ 🐥 │
│ varchar │
├───────────┤
│ Hello Joe │
└───────────┘
| Feature | This Template | Official Template |
|---|---|---|
| Rust Edition | 2024+ | 2021 only |
| Required Tools | Rust toolchain only | Rust + Python + Python3-venv + make + git |
| Build Process | Cargo plugins (native Rust) | Python scripts |
| Performance | Faster builds | Slower due to Python overhead |
| Developer Experience | More native Rust workflow | Mixed Rust/Python workflow |
- Based on DuckDB's official extension-template-rs
- Uses duckdb and duckdb-ext-macros crates