Skip to content

Instantly share code, notes, and snippets.

@cking
Last active February 17, 2021 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cking/36fe8eb48f123d0fbfa4ca05ea1949cd to your computer and use it in GitHub Desktop.
Save cking/36fe8eb48f123d0fbfa4ca05ea1949cd to your computer and use it in GitHub Desktop.
my rust tools and libs

Rust

Tools

cargo-audit

Security audit of the Cargo.lock file. Checkts the audit database for any reported issues.

Warning: First run can be very slow, because it's building a copy of the crates.io database.

Example output console output

cargo-deps

Create Graphviz graph of the used deps (needs graphviz or a dot compatible tool installed)

cargo-geiger

Geigercounter for unsafe / unstable rust code (if installation fails, use cargo install --locked cargo-geiger)

Warning: Execution can be slow, because it is inspecting the complete dependency graph of a project

Example output: console output

cargo-license

Display license overview of referenced libraries

cargo-outdated

List outdated crates from your Cargo.toml

cargo-release

Release a new version of your crate and optionally upload to crates.io.

cargo-watch

Run a specified command on detected file changes (check by default). Can be combined with listenfd for example

clippy

Check rust code for common mistakes - install via rustup

rustfmt

Reformat rust code - install via rustup

Libraries

API

imap

Github: https://github.com/jonhoo/rust-imap IMAP adapter and connector for rust

lettre

Github: https://github.com/lettre/lettre SMTP, sendmail (and more) mail sender

mailparse

Github: https://github.com/staktrace/mailparse Parse a mail content response.

Async, Futures, Multi Threading and Parallelism

async-std

Github: https://github.com/async-rs/async-std Lots of async ports of std lib structs and functions

futures

Github: https://github.com/rust-lang/futures-rs Several functions for async programming, like Promises (JavaScript)/Tasks (.net).

mio

Github: https://github.com/tokio-rs/mio Async low level I/O

parking_lot

Github: https://github.com/Amanieu/parking_lot This library provides implementations of Mutex, RwLock, Condvar and Once that are smaller, faster and more flexible

pollster

Github: https://github.com/zesterer/pollster Pollster is an incredibly minimal async executor

rayon

Github: https://github.com/rayon-rs/rayon Rayon is a parallel iter processor - it converts simple, single threaded (or blocking) iter calls into parallel ones. It is lightweight and ensures to be mostly data race free.

tokio

Github: https://github.com/tokio-rs/tokio Async event-driven and non blocking (I/O) platform and runner for rust

Audio

ears

Github: https://github.com/jhasse/ears OpenAL and libsndfile based audio playback.

rodio

Github: https://github.com/RustAudio/rodio Rust only playback system for wav, mp3, ogg and flac.

Console and Terminal

clap

Github: https://github.com/clap-rs/clap Command line parsing library for rust, comes integrated with stuctopt starting on v3.

indicatif

Github: https://github.com/mitsuhiko/indicatif Progressbars and single char spinners for the console

rustyline

Github: https://github.com/kkawakam/rustyline Simple Readline like library

yansi

Github: https://github.com/SergioBenitez/yansi Enable ansi based coloring of consoles. (Windows support only starting with Win 10 anniversary edition / ConPTY)

Cryptography

hashes

Github: https://github.com/RustCrypto/hashes Provide several pure rust implementation of common hashing algorithms. See github repo for actual crate names

scrypt

Github: https://github.com/RustCrypto/password-hashes Provides several password specialized hashing algorithms. See github repo for actual crate names

Database

redis

Github: https://github.com/mitsuhiko/redis-rs Redis adapter and connector

postgres & tokio-postgres

Github: https://github.com/sfackler/rust-postgres postgres adapter and connector, with async version

Derives

derive_more

Github: https://github.com/JelteF/derive_more Derives for basic builtin traits

derive-new

Github: https://github.com/nrc/derive-new A derive(new) attribute creates a new constructor function for the annotated type

typed-builder

Github: https://github.com/idanarye/rust-typed-builder Creates a compile-time verified builder

Error Handling

anyhow

Github: https://github.com/dtolnay/anyhow This library provides anyhow::Error, a trait object based error type for easy idiomatic error handling in Rust applications.

backtrace

Github: https://github.com/rust-lang/backtrace-rs A library for acquiring backtraces at runtime for Rust.

thiserror

Github: https://github.com/dtolnay/thiserror This library provides a convenient derive macro for the standard library's std::error::Error trait.

Graphics

distill

Github: https://github.com/amethyst/distill Distill is an asset pipeline for games, reading artist-friendly formats from disk, processing them into your engine-ready formats, and delivering them to your game runtime.

egui

Github: https://github.com/emilk/egui Immediate equi in pure rust

legion

Github: https://github.com/amethyst/legion Legion aims to be a feature rich high performance Entity component system (ECS) library for Rust game projects with minimal boilerplate.

gltf

Github: https://github.com/gltf-rs/gltf glTF 2.0 loader

tobj

Github: https://github.com/Twinklebear/tobj tiny object loader

vulkanalia

Github: https://crates.io/crates/vulkanalia Vulkan interop

winit

Github: https://github.com/rust-windowing/winit Cross-platform window creation and management in Rust

Interop and Scripting

cbindgen

Github: https://github.com/eqrion/cbindgen/ Generate C/++ header files for library crates that provides a public C api (see docs for details).

cvar

Github: https://github.com/CasualX/cvar Configure programs through stringly typed API.

j4rs

Github: https://github.com/astonbitecode/j4rs Java 4 Rust - call java from rust, or provide jni libs for the jvm.

jni

Github: https://github.com/jni-rs/jni-rs JNI for rust.

mlua

Github: https://github.com/khvzak/mlua Lua scripting (5.1 - 5.4)

rquickjs

Github: https://github.com/DelSkayn/rquickjs quickjs based javascript interpreter and executer

Misc

activitystreams

Github: https://git.asonix.dog/Aardwolf/activitystreams activity streams

activitystreams-ext

Github: https://git.asonix.dog/Aardwolf/activitystreams activity streams extensions

byteorder

Github: https://github.com/BurntSushi/byteorder This crate provides convenience methods for encoding and decoding numbers in either big-endian or little-endian order.

config

Github: https://github.com/mehcode/config-rs Configure your application from config files (json, toml, yaml, hjson, ini). Extensible with custom types.

dotenv

Github: https://github.com/dotenv-rs/dotenv dotenv loading (simple variable name to value mapping)

image

Github: https://github.com/image-rs/image Image loading and saving

imageproc

Github: https://github.com/image-rs/imageproc Image processing using image

itertools

Github: https://github.com/rust-itertools/itertools Iterator extensions

lazy_static

Github: https://github.com/rust-lang-nursery/lazy-static A macro for declaring lazily evaluated statics in Rust.

listenfd

Github: https://github.com/mitsuhiko/rust-listenfd listenfd is a crate that provides support for working with externally managed and passed file descriptors.

systemfd

Github: https://github.com/mitsuhiko/systemfd systemfd is a program that opens ports and forwards them to listenfd, can be used with cargo-watch

nalgebra

Github: https://github.com/dimforge/nalgebra Linear algebra written in pure rust

num_cpus

Github: https://github.com/seanmonstar/num_cpus Count the number of CPUs on the current machine.

priority-queue

Github: https://github.com/garro95/priority-queue Priority based queue for rust

rand

Github: https://crates.io/crates/rand random number generators

regex

Github: https://github.com/rust-lang/regex Regular expression with linear execution

rust-embed

Github: https://github.com/pyros2097/rust-embed Embed files into binary on release, read live from filesystem on debug

strsim

Github: https://github.com/dguo/strsim-rs Calculate string similarity using different algorithms

tempfile

Github: https://github.com/Stebalien/tempfile Temp files and folders

tracing

Github: https://github.com/tokio-rs/tracing Application-level tracing for Rust.

tracing-unwrap

Github: https://github.com/abreis/tracing-unwrap This crate provides .unwrap_or_log() and .expect_or_log() methods on Result and Option types that log failed

tracing-subscriber

Github: https://github.com/tokio-rs/tracing Utilities for implementing and composing tracing subscribers.

tracy-rs

Github: https://crates.io/crates/tracy-rs Rust bindings for the tracy realtime profiler

tracing-tracy

Github: https://github.com/nagisa/rust_tracy_client Tracy integration with tracy

tracy

Github: https://github.com/nagisa/rust_tracy_client client library for tracy

walkdir

Github: https://github.com/BurntSushi/walkdir Cross platform implementation of walking through a file system directory recursively.

webfinger

Github: https://github.com/Plume-org/webfinger A crate to help you fetch and serve WebFinger resources.

xid

Github: https://github.com/kazk/xid-rs Globally unique sortable id generator.

Networking

hyper

Github: https://github.com/hyperium/hyper low-level http 1 & 2 server

reqwest

Github: https://github.com/seanmonstar/reqwest HTTP client

thrush

Pijul: https://pijul.org/thrussh/ (uses pijul version control system) Pure rust ssh client & server library

tungstenite

Github: https://github.com/snapview/tungstenite-rs Stream based websocket handler

warp

Github: https://github.com/seanmonstar/warp basic http micro framework on top of hyper.

OS specific

Windows

winapi

Github: https://github.com/retep998/winapi-rs Windows API implementration.

winapi-util

Github: https://github.com/BurntSushi/winapi-util wrappers around winapi to provide common scenarios without much ffi code.

Serialization

ammonia

Github: https://github.com/rust-ammonia/ammonia Ammonia is a whitelist-based HTML sanitization library.

serde

Github: https://github.com/serde-rs/serde Core component of most serialization modules

ron

Github: https://github.com/ron-rs/ron Rust Object Notion support for serde

rmps

Github: https://github.com/3Hren/msgpack-rust msgpack support for serde

serde_json

Github: https://github.com/serde-rs/json json support for serde

serde_qs

Github: https://github.com/samscott89/serde_qs url encoded parser (as used e.g. in querystrings), supports nested values and deserializing into nested structs. uses serde_urlencoded under the hud.

serde_urlencoded

Github: https://github.com/nox/serde_urlencoded url encoded parser (as used e.g. in querystrings), only supports top level parsing (e.g. no arrays)

serde_yaml

Github: https://github.com/dtolnay/serde-yaml yaml support for serde

toml

Github: https://github.com/alexcrichton/toml-rs toml support for serde

url

Github: https://github.com/servo/rust-url url parsing according to whatwg url standard

Time

chrono

Github: https://github.com/chronotope/chrono Useful extensions to std::time.

chrono-tz

Github: https://github.com/djzin/chrono-tz Timezones for chrono.

Stopwatch

Github: https://github.com/ellisonch/rust-stopwatch Stopwatch (timings) module

Testing

quickcheck

Github: https://github.com/BurntSushi/quickcheck Send random input data to a function - with proper shrinking.

Unused libraries

These are mostly a list of libs, I might consider at some point

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment