Skip to content

redraiment/duckdb-ext-rs-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DuckDB Extension Template for Rust

A modern Rust template for developing DuckDB extensions with improved developer experience compared to the official template.

Features

  • 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

Quick Start

  1. 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
  1. 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 │
└───────────┘

Comparison with Official Template

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

Acknowledgments

About

A modern Rust template for developing DuckDB extensions

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages