What problem does it solve?
This Skill addresses the complexity of writing and maintaining type-safe database queries in Rust applications interacting with PostgreSQL, ensuring code generation aligns with SQL schema and reducing runtime errors.
Core Features & Use Cases
- SQL Query Annotation: Define queries with named parameters and type annotations directly in
.sql files.
- Code Generation: Automatically generate Rust modules for type-safe query execution.
- Workflow Management: Supports
schema (ephemeral DB), live (existing DB), and build.rs integration for generation.
- Use Case: When developing a Rust web service that heavily relies on PostgreSQL, use this Skill to generate Rust code from your SQL queries, ensuring that parameter binding and result mapping are type-checked at compile time.
Quick Start
Use the cornucopia-rs-usage skill to set up Cornucopia for a new Rust project by following the installation and dependency setup guide.