Why use Rust on the back end?

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

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

    Simple validation for Rust structs (by Keats)

  • sqlc

    Generate type-safe code from SQL

  • Why don't you use sqlc + pgx? What's missing from the two?

    https://github.com/kyleconroy/sqlc

    https://github.com/jackc/pgx

  • 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
  • pgx

    PostgreSQL driver and toolkit for Go

  • Why don't you use sqlc + pgx? What's missing from the two?

    https://github.com/kyleconroy/sqlc

    https://github.com/jackc/pgx

  • rust-playground

    The Rust Playground

  • Here's an example I threw together: https://play.rust-lang.org/?version=stable&mode=debug&editio...

    Hopefully that gets the gist of how you might approach it. I'm not sure I'd use the HashSet myself, to be completely honest, because it makes it needlessly complicated to get an element out of it. I'd probably just use a Vec.

  • 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)

  • > Doesn't it need to run introspection queries to check the table structures?

    Yes, but it can also run in 'offline' mode where it builds against saved metadata [0]

    0: https://github.com/launchbadge/sqlx/blob/main/sqlx-cli/READM...

  • diesel

    A safe, extensible ORM and Query Builder for Rust

  • Please reach out on the diesel discussion forum[1] about the lacking dev experience. I'm happy to discuss these issues and potential solutions there.

    [1] https://github.com/diesel-rs/diesel/discussions

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