Cornucopia v0.8: Generate type-checked Rust interfaces from your PostgreSQL queries.

This page summarizes the projects mentioned and recommended in the original post on /r/rust

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • sqlx

    🧰 The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite. (by launchbadge)

  • SQLx uses some inference heuristics that will break some valid PostgreSQL queries (e.g. https://github.com/launchbadge/sqlx/issues/1266, https://github.com/launchbadge/sqlx/issues/1980). The error messages can be jarring sometimes. Cornucopia doesn't use any heuristics and gets its type inference directly from rust-postgres. I have yet to see Cornucopia fail to generate code from valid SQL.

  • cornucopia

    Generate type-checked Rust from your PostgreSQL.

  • respository | book | crates.io | discord

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • metrics

  • Performance is always a hot topic, so take this with a grain of salt, but in our benchmarks, Cornucopia performs very close to the rust-postgres drivers, which themselves beat SQLx by a significant margin in the ubiquitous db interface benchmarks provided by Diesel (https://github.com/diesel-rs/metrics). Take this with a grain of salt though, since this is an indirect comparison. We'll try to provide a direct comparison with SQLx in our benchmarks as soon as possible.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts