Choosing between Rust and C++ for a new project

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

    Rust friendly bindings to *nix APIs (by nix-rust)

  • The nix crate has you covered. Check out some usages.

  • rust-bindgen

    Automatically generates Rust FFI bindings to C (and some C++) libraries.

  • For me, it's no question: for new code, I'd write Rust over C++ any day. The syscalls are all built into the standard library; they're no problem. Even if I had to interact heavily with an existing C/C++ library, bindgen and cxx are fantastic; I'd still write my new code in Rust.

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

    Safe interop between Rust and C++

  • For me, it's no question: for new code, I'd write Rust over C++ any day. The syscalls are all built into the standard library; they're no problem. Even if I had to interact heavily with an existing C/C++ library, bindgen and cxx are fantastic; I'd still write my new code in Rust.

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