Skip to content

Rust

Rustup

bash
rustup install stable
rustup self uninstall

Libraries / Frameworks

Recommended crates

  • h3o - Rust implementation of the H3 geospatial indexing system
  • whichlang - A blazingly fast and lightweight language detection library for Rust

Backend

  • axum - Ergonomic and modular web framework built with Tokio, Tower, and Hyper
  • sqlx - The Rust SQL Toolkit. An async, pure Rust SQL crate featuring compile-time checked queries without a DSL. Supports PostgreSQL, MySQL, and SQLite

CLI

  • bubbletea-rs - A rust implementation of Bubbletea
  • clap - A full featured, fast Command Line Argument Parser for Rust
  • ratatui - A Rust crate for cooking up terminal user interfaces (TUIs)
  • rattles - 🪇 Minimal terminal spinners for Rust

Data

  • fake-rs - A library for generating fake data in Rust.
  • fory - A blazingly fast multi-language serialization framework powered by JIT and zero-copy.
  • rayon - A data parallelism library for Rust

Distributed Systems

  • Iroh - Iroh is a library for building on direct connections between devices, putting more control in the hands of your users.

Logging

  • logforth - A versatile and extensible logging implementation.

Networking

  • pingora - A library for building fast, reliable and evolvable network services
  • rama - modular service framework to move and transform network packets

GUI

  • egui - An immediate mode GUI written in Rust
  • iced - A cross-platform GUI library for Rust focused on simplicity and type-safety. Inspired by Elm.

Utilities

  • arboard - A clipboard for Rust
  • hotpath-rs - Simple async Rust profiler with memory and data-flow insights - quickly find and debug performance bottlenecks.

Cookbook

Inspect binary size

bash
cargo install cargo-bloat

cargo bloat --release --crates
cargo bloat --release -n 20

Pin rust version

toml
# rust-toolchain.toml
[toolchain]
channel = "1.95.0"
components = ["rustfmt", "clippy"]

Optimize binary size

bash
# add to Cargo.toml

[profile.release]
opt-level = "z"
lto = true
codegen-units = 1
panic = "abort"
strip = true # Rust 1.59+ can strip symbols automatically

References

Are We $X Yet

Branding

Resources