mirror of
https://github.com/nicoburns/blessed-rs
synced 2024-11-27 06:00:25 +00:00
845 lines
42 KiB
JSON
845 lines
42 KiB
JSON
{
|
||
"crate_groups": [
|
||
{
|
||
"slug": "tooling",
|
||
"name": "Tooling",
|
||
"description": "Developer tools for working with Rust projects.",
|
||
"subgroups": [],
|
||
"purposes": [
|
||
{
|
||
"name": "Linting",
|
||
"recommendations": [{
|
||
"name": "clippy",
|
||
"link": "https://github.com/rust-lang/rust-clippy#usage",
|
||
"notes": "The official Rust linter."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Code Formatting",
|
||
"recommendations": [{
|
||
"name": "rustfmt",
|
||
"link": "https://github.com/rust-lang/rustfmt#rustfmt----",
|
||
"notes": "The official Rust code formatter."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Managing Dependencies",
|
||
"recommendations": [{
|
||
"name": "cargo-edit",
|
||
"link": "https://github.com/killercup/cargo-edit",
|
||
"notes": "Adds 'cargo add', 'cargo rm', and 'cargo upgrade' commands to cargo"
|
||
}, {
|
||
"name": "cargo-outdated",
|
||
"link": "https://github.com/kbknapp/cargo-outdated#cargo-outdated",
|
||
"notes": "Finds dependencies that have available updates"
|
||
}, {
|
||
"name": "cargo-audit",
|
||
"link": "https://github.com/RustSec/rustsec/tree/main/cargo-audit#rustsec-cargo-audit",
|
||
"notes": "Check dependencies for reported security vulnerabilities"
|
||
}, {
|
||
"name": "cargo-license",
|
||
"link": "https://github.com/onur/cargo-license#cargo-license",
|
||
"notes": "Lists licenses of all dependencies"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Testing",
|
||
"recommendations": [{
|
||
"name": "cargo-nextest",
|
||
"link": "https://nexte.st",
|
||
"notes": "Faster, better test runner"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Benchmarking",
|
||
"recommendations": [{
|
||
"name": "criterion",
|
||
"notes": "Statistically accurate benchmarking tool for benchmarking libraries"
|
||
}, {
|
||
"name": "hyperfine",
|
||
"link": "https://github.com/sharkdp/hyperfine#hyperfine",
|
||
"notes": "Tool for benchmarking compiled binaries (similar to unix time command but better)"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Profiling",
|
||
"recommendations": [{
|
||
"name": "cargo-flamegraph",
|
||
"link": "https://github.com/flamegraph-rs/flamegraph#cargo-flamegraph",
|
||
"notes": "Execution flamegraph generation"
|
||
}, {
|
||
"name": "dhat",
|
||
"notes": "Heap memory profiling"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Debugging Macros",
|
||
"recommendations": [{
|
||
"name": "cargo-expand",
|
||
"link": "https://github.com/dtolnay/cargo-expand#cargo-expand",
|
||
"notes": "Allows you to inspect the code that macros expand to"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Cross Compiling",
|
||
"recommendations": [{
|
||
"name": "cross",
|
||
"link": "https://github.com/cross-rs/cross#cross",
|
||
"notes": "Seamless cross-compiling using Docker containers."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Release Automation",
|
||
"recommendations": [{
|
||
"name": "cargo-release",
|
||
"link": "https://github.com/crate-ci/cargo-release#cargo-release",
|
||
"notes": "Helper for publishing new crate versions."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Continuous Integration",
|
||
"recommendations": [{
|
||
"name": "cargo-deny",
|
||
"link": "https://github.com/EmbarkStudios/cargo-deny#-cargo-deny",
|
||
"notes": "Enforce varies policies on your code and dependencies."
|
||
}, {
|
||
"name": "rust-toolchain (github action)",
|
||
"link": "https://github.com/dtolnay/rust-toolchain#install-rust-toolchain",
|
||
"notes": "Github action to install Rust components via rustup"
|
||
}, {
|
||
"name": "rust-cache (github action)",
|
||
"link": "https://github.com/Swatinem/rust-cache#rust-cache-action",
|
||
"notes": "Github action to cache compilation artifacts and speed up subsequent runs."
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "common",
|
||
"name": "Common",
|
||
"description": "Very commonly used crates that everyone should know about",
|
||
"subgroups": [
|
||
{
|
||
"slug": "general",
|
||
"name": "General",
|
||
"description": "General purpose ",
|
||
"purposes": [
|
||
{
|
||
"name": "Random numbers",
|
||
"recommendations": [{
|
||
"name": "rand",
|
||
"notes": "De facto standard random number generation library split out from the standard library"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Time & Date",
|
||
"notes": "Unfortunately there is no clear answer as to which is best between time and chrono.<br />Evaluate for yourself between these two, but be resassured that both are trusted and well-maintained.",
|
||
"recommendations": [{
|
||
"name": "time",
|
||
"notes": "A smaller, simpler library. Preferrable if covers your needs, but it's quite limited in what it provides."
|
||
}, {
|
||
"name": "chrono",
|
||
"notes": "The most comphrehensive and full-featured datetime library, but more complex because of it."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Serialization (JSON, YAML, etc)",
|
||
"notes": "See <a href=\"https://docs.rs/serde/latest/serde/#data-formats\">here</a> for supported formats.",
|
||
"recommendations": [{
|
||
"name": "serde",
|
||
"notes": "De facto standard serialization library. Use in conjunction with sub-crates like serde_json for the specific format that you are using."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Regular Expressions",
|
||
"recommendations": [{
|
||
"name": "regex",
|
||
"notes": "De facto standard regex library. Very fast, but does not support fancier features such as backtracking."
|
||
},
|
||
{
|
||
"name": "fancy_regex",
|
||
"notes": "Use if need features such as backtracking which regex doesn't support"
|
||
}]
|
||
},
|
||
{
|
||
"name": "UUIDs",
|
||
"recommendations": [{
|
||
"name": "uuid",
|
||
"notes": "Implements generating and parsing UUIDs and a number of utility functions"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Temporary files",
|
||
"recommendations": [{
|
||
"name": "tempfile",
|
||
"notes": "Supports both temporary files and temporary directories"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Gzip (de)compression",
|
||
"recommendations": [{
|
||
"name": "flate2",
|
||
"notes": "Uses a pure-Rust implementation by default. Use feature flags to opt in to system zlib."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Insertion-ordered map",
|
||
"recommendations": [{
|
||
"name": "indexmap",
|
||
"notes": "A HashMap that seperately keeps track of insertion order and allows you to efficiently iterate over its elements in that order"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Stack-allocated arrays",
|
||
"recommendations": [{
|
||
"name": "arrayvec",
|
||
"notes": "Arrays that are ONLY stack-allocated with fixed capacity"
|
||
}, {
|
||
"name": "smallvec",
|
||
"notes": "Arrays that are stack-allocated with fallback to the heap if the fixed stack capacity is exceeded"
|
||
}, {
|
||
"name": "tinyvec",
|
||
"notes": "Stack allocated arrays in 100% safe Rust code but requires items to implement the Default trait."
|
||
}]
|
||
},
|
||
{
|
||
"name": "HTTP Requests",
|
||
"recommendations": [{
|
||
"name": "reqwest",
|
||
"notes": "Full-fat HTTP client. Can be used in both synchronous and asynchronous code. Requires tokio runtime."
|
||
}, {
|
||
"name": "ureq",
|
||
"notes": "Minimal synchronous HTTP client focussed on simplicity and minimising dependencies."
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "error-handling",
|
||
"name": "Error Handling",
|
||
"description": "Crates for more easily handling errors",
|
||
"purposes": [
|
||
{
|
||
"name": "For applications",
|
||
"recommendations": [{
|
||
"name": "anyhow",
|
||
"notes": "Provides a boxed error type that can hold any error, and helpers for generating an application-level stack trace."
|
||
}, {
|
||
"name": "color-eyre",
|
||
"notes": "A fork of anyhow that gives you more control over the format of the generated error messages. Recommended if you need intend to present error messages to end users. Otherwise anyhow is simpler."
|
||
}]
|
||
},
|
||
{
|
||
"name": "For libraries",
|
||
"recommendations": [{
|
||
"name": "thiserror",
|
||
"notes": "Helps with generating boilerplate for enum-style error types."
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "logging",
|
||
"name": "Logging",
|
||
"description": "Crates for logging. Note that in general you will need a seperate crate for actually printing/storing the logs",
|
||
"purposes": [
|
||
{
|
||
"name": "Text-based logging",
|
||
"recommendations": [{
|
||
"name": "tracing",
|
||
"notes": "Tracing is now the go-to crate for logging."
|
||
}, {
|
||
"name": "log",
|
||
"notes": "An older and simpler crate if your needs are simple and you are not using any async code."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Structured logging",
|
||
"recommendations": [{
|
||
"name": "tracing",
|
||
"notes": "Tracing is now the go-to crate for logging."
|
||
}, {
|
||
"name": "slog",
|
||
"notes": "Structured logging"
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "lang-extensions",
|
||
"name": "Language Extensions",
|
||
"description": "General purpose utility crates that extend language and/or stdlib functionality.",
|
||
"purposes": [
|
||
{
|
||
"name": "Lazy static variable initialization",
|
||
"recommendations": [{
|
||
"name": "once_cell",
|
||
"notes": "Newer crate with more ergonomic API. On track to be incorporated into the standard library. Should be preferred for all new projects."
|
||
}, {
|
||
"name": "lazy_static",
|
||
"notes": "Older crate. API is less convenient, but crate is stable and maintained."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Iterator helpers",
|
||
"recommendations": [{
|
||
"name": "itertools",
|
||
"notes": "A bunch of useful methods on iterators that aren't in the stdlib"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Macro helpers",
|
||
"recommendations": [{
|
||
"name": "syn",
|
||
"notes": "Parse rust source code"
|
||
}, {
|
||
"name": "quote",
|
||
"notes": "Quasi quoting rust (useful for interpolating generated code with literal code)"
|
||
}, {
|
||
"name": "paste",
|
||
"notes": "Concatenating and manipulating identifiers"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Abstracting over different number types",
|
||
"recommendations": [{
|
||
"name": "num",
|
||
"notes": "Traits like Number, Add, etc that allow you write functions that are generic over the specific numeric type"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Safe type casts",
|
||
"recommendations": [{
|
||
"name": "bytemuck"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Bitflags",
|
||
"recommendations": [{
|
||
"name": "bitflags",
|
||
"notes": "Strongly typed bitflag types"
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "system",
|
||
"name": "System",
|
||
"description": "For low-level interaction with the underling platform / operating system",
|
||
"purposes": [
|
||
{
|
||
"name": "Memory mapping files",
|
||
"recommendations": [{
|
||
"name": "memmap2",
|
||
"notes": "The older memmap crate is unmaintained."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Libc",
|
||
"recommendations": [{
|
||
"name": "libc",
|
||
"notes": "Bindings for directly calling libc functions."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Windows (OS)",
|
||
"recommendations": [{
|
||
"name": "windows",
|
||
"notes": "The official Microsoft-provided crate for interacting with windows APIs"
|
||
}, {
|
||
"name": "winapi",
|
||
"notes": "Older binding to the windows APIs. Unofficial, but more complete than windows-rs"
|
||
}]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "cryptography",
|
||
"name": "Cryptography",
|
||
"description": "Crates that provide implementations of cryptographic algorithms. This section attempts to list the best crates for the listed algorithms, but does not intend to make recommendations for the algorithms themselves.<br />",
|
||
"subgroups": [],
|
||
"purposes": [
|
||
{
|
||
"name": "Password Hashing",
|
||
"notes": "For more algorithms, see <a href=\"https://github.com/RustCrypto/password-hashes#rustcrypto-password-hashes\">Rust Crypto Password Hashes</a>.",
|
||
"recommendations": [
|
||
{ "name": "argon2" },
|
||
{ "name": "scrypt" },
|
||
{ "name": "bcrypt" }
|
||
]
|
||
},
|
||
{
|
||
"name": "General Purpose Hashing",
|
||
"notes": "For more algorithms, see <a href=\"https://github.com/RustCrypto/hashes#rustcrypto-hashes\">Rust Crypto Hashes</a>.",
|
||
"recommendations": [
|
||
{ "name": "sha2" },
|
||
{ "name": "sha1" },
|
||
{ "name": "md-5" }
|
||
]
|
||
},
|
||
{
|
||
"name": "AEAD Encryption",
|
||
"notes": "For more algorithms, see <a href=\"https://github.com/RustCrypto/AEADs#rustcrypto-authenticated-encryption-with-associated-data-aead-algorithms\">Rust Crypto AEADs</a>.",
|
||
"recommendations": [
|
||
{ "name": "aes-gcm-siv" },
|
||
{ "name": "aes-gcm" },
|
||
{ "name": "chacha20poly1305" }
|
||
]
|
||
},
|
||
{
|
||
"name": "RSA",
|
||
"recommendations": [
|
||
{ "name": "rsa" }
|
||
]
|
||
},
|
||
{
|
||
"name": "Digital Signatures",
|
||
"notes": "For more algorithms, see <a href=\"https://github.com/RustCrypto/signatures#rustcrypto-signatures--\">Rust Crypto Signatures</a>.",
|
||
"recommendations": [
|
||
{ "name": "ed25519", "notes": "Use in conjunction with the ed25519-dalek crate." },
|
||
{ "name": "ecdsa" },
|
||
{ "name": "dsa" }
|
||
]
|
||
},
|
||
{
|
||
"name": "Certificate Formats",
|
||
"notes": "For more formats, see <a href=\"https://github.com/RustCrypto/formats#rustcrypto-formats--\">Rust Crypto Formats</a>.",
|
||
"recommendations": [
|
||
{ "name": "der" },
|
||
{ "name": "pem‑rfc7468" },
|
||
{ "name": "pkcs8" },
|
||
{ "name": "x509-cert" }
|
||
]
|
||
},
|
||
{
|
||
"name": "TLS / SSL",
|
||
"recommendations": [{
|
||
"name": "rustls",
|
||
"notes": "A portable pure-rust high-level implementation of TLS. Implements TLS 1.2 and higher."
|
||
}, {
|
||
"name": "native-tls",
|
||
"notes": "Delegates to the system TLS implementations on windows and macOS, and uses OpenSSL on linux."
|
||
}],
|
||
"see_also": [{
|
||
"name": "webpki",
|
||
"notes": "X.509 Certificate validation. Builds on top of ring."
|
||
}, {
|
||
"name": "ring",
|
||
"notes": "Fork of BoringSSL. Provides low-level cryptographic primitives for TLS/SSL"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Utilities",
|
||
"recommendations": [{
|
||
"name": "subtle",
|
||
"notes": "Utilities for writing constant-time algorithms"
|
||
},
|
||
{
|
||
"name": "zeroize",
|
||
"notes": "Securely erase memory"
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
|
||
{
|
||
"slug": "networking",
|
||
"name": "Networking",
|
||
"description": "TCP, HTTP, GRPc, etc. And the executors required to do asynchronous networking.",
|
||
"subgroups": [
|
||
{
|
||
"slug": "async-executors",
|
||
"name": "Async Executors",
|
||
"description": "To do async programming using the async-await in Rust you need a runtime to execute drive your Futures.",
|
||
"purposes": [
|
||
{
|
||
"name": "General purpose",
|
||
"recommendations": [{
|
||
"name": "tokio",
|
||
"notes": "The oldest async runtime in the Rust ecosystem and still the most widely supported. Recommended for new projects."
|
||
}, {
|
||
"name": "async-std",
|
||
"notes": "A newer option that is very similar to tokio. Its API more closely mirrors the std library, but it doesn't have as much traction as Tokio."
|
||
}]
|
||
},
|
||
{
|
||
"name": "io_uring",
|
||
"recommendations": [{
|
||
"name": "glommio",
|
||
"notes": "Use if you need io_uring support. Still somewhat experimental but rapidly maturing."
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "http-foundations",
|
||
"name": "HTTP",
|
||
"description": "HTTP client and server libraries, as well as lower-level building blocks.",
|
||
"purposes": [
|
||
{
|
||
"name": "Types & Interfaces",
|
||
"recommendations": [{
|
||
"name": "http",
|
||
"notes": "The `http` crate doesn't actually contain an HTTP implementation. Just types and interfaces to help interoperability."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Low-level HTTP Implementation",
|
||
"recommendations": [{
|
||
"name": "hyper",
|
||
"notes": "A low-level HTTP implementation (both client and server). Implements HTTP 1, 2, and 3. Works best with the tokio async runtime, but can support other runtimes."
|
||
}]
|
||
},
|
||
{
|
||
"name": "HTTP Client",
|
||
"recommendations": [{
|
||
"name": "reqwest",
|
||
"notes": "Full-fat HTTP client. Can be used in both synchronous and asynchronous code. Requires tokio runtime."
|
||
}, {
|
||
"name": "ureq",
|
||
"notes": "Minimal synchronous HTTP client focussed on simplicity and minimising dependencies."
|
||
}],
|
||
"see_also": [{
|
||
"name": "surf",
|
||
"notes": "Client that uses the async-std runtime rather than the tokio runtime. Not well maintained."
|
||
}]
|
||
},
|
||
{
|
||
"name": "HTTP Server",
|
||
"recommendations": [{
|
||
"name": "axum",
|
||
"notes": "A minimal and ergonomic framework. An official part of the tokio project. Recommend for most new projects."
|
||
}, {
|
||
"name": "actix-web",
|
||
"notes": "A performance focussed framework. All Rust frameworks are fast, but choose actix-web if you need the absolutely maximum performance."
|
||
}],
|
||
"see_also": [{
|
||
"name": "rocket",
|
||
"notes": "Has an excellent API and a solid implementation. However development has been intermittent, and the async branch still doesn't have a stable release. Use of rocket is not recommended until this has fixed."
|
||
}, {
|
||
"name": "poem",
|
||
"notes": "Automatically generates OpenAPI defintions."
|
||
}, {
|
||
"name": "warp",
|
||
"notes": "Very similar to axum but with a quirkier API. This is a solid framework, but you should probably prefer Axum unless you particularly like the API"
|
||
}, {
|
||
"name": "tide",
|
||
"notes": "Similar to Axum, but based on async-std rather than tokio"
|
||
}]
|
||
},
|
||
{
|
||
"name": "GraphQL Server",
|
||
"recommendations": [{
|
||
"name": "async-graphql",
|
||
"notes": "A high-performance graphql server library that's fully specification compliant. Integrates with actix-web, axum, poem, rocket, tide, warp."
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "websockets",
|
||
"name": "Websockets",
|
||
"description": "This section includes libraries for you to use just websockets. However note that many of the HTTP server frameworks in the section above also support websockets",
|
||
"purposes": [
|
||
{
|
||
"name": "Low-level",
|
||
"recommendations": [{
|
||
"name": "tungstenite-rs",
|
||
"notes": "Low-level crate that others build on"
|
||
}]
|
||
},
|
||
{
|
||
"name": "General Purpose",
|
||
"recommendations": [{
|
||
"name": "tokio-tungstenite",
|
||
"notes": "If you are using the tokio executor"
|
||
}, {
|
||
"name": "async-tungstenite",
|
||
"notes": "If you are using the async-std executor"
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "grpc",
|
||
"name": "gRPC",
|
||
"purposes": [
|
||
{
|
||
"name": "General Purpose",
|
||
"recommendations": [{
|
||
"name": "tonic",
|
||
"notes": "gRPC over HTTP/2 with full support for asynchronous code. Works with tokio"
|
||
}]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "databases",
|
||
"name": "Databases",
|
||
"subgroups": [
|
||
{
|
||
"slug": "sql-databases",
|
||
"name": "SQL Databases",
|
||
"purposes": [
|
||
{
|
||
"name": "Multi Database",
|
||
"recommendations": [{
|
||
"name": "sqlx",
|
||
"notes": "Works with Postgres, MySQL, SQLite, and MS SQL.<br />Supports compile time checking of queries. Async: supports both tokio and async-std."
|
||
}]
|
||
},
|
||
{
|
||
"name": "ORMs",
|
||
"recommendations": [{
|
||
"name": "sea-orm",
|
||
"notes": "Recommended. Built on top of sqlx. There is also a related sea-query crate that provides a query builder without full ORM functionality."
|
||
}, {
|
||
"name": "diesel",
|
||
"notes": "Stable release is sync only. Pre-release async branch is currently AGPL. Can provide better performance in some circumstances."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Postgres",
|
||
"recommendations": [{
|
||
"name": "sqlx"
|
||
}, {
|
||
"name": "tokio-postgres",
|
||
"notes": "Postgres-specific library. Performs better than SQLx"
|
||
}]
|
||
},
|
||
{
|
||
"name": "MySQL",
|
||
"recommendations": [{
|
||
"name": "sqlx"
|
||
}, {
|
||
"name": "mysql_async",
|
||
"notes": "Has a poorly designed API. Prefer SQLx for MySQL"
|
||
}]
|
||
},
|
||
{
|
||
"name": "SQLite",
|
||
"recommendations": [{
|
||
"name": "sqlx"
|
||
}, {
|
||
"name": "rustqlite",
|
||
"notes": "Provides a sync API to SQLite + provides access to advanced sqlite features."
|
||
}]
|
||
},
|
||
{
|
||
"name": "MS SQL",
|
||
"recommendations": [{
|
||
"name": "sqlx"
|
||
}, {
|
||
"name": "tiberius",
|
||
"notes": "MS SQL specific library. Has better support for advanced column types than SQLx."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Oracle",
|
||
"recommendations": [{
|
||
"name": "oracle",
|
||
"notes": "Rust bindings to ODPI-C"
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "other-databases",
|
||
"name": "Other Databases",
|
||
"purposes": [
|
||
{
|
||
"name": "Redis",
|
||
"recommendations": [{
|
||
"name": "redis"
|
||
}]
|
||
},
|
||
{
|
||
"name": "MongoDB",
|
||
"recommendations": [{
|
||
"name": "mongodb"
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "sql-utilities",
|
||
"name": "Utilities",
|
||
"purposes": [
|
||
{
|
||
"name": "Connection pool",
|
||
"recommendations": [{
|
||
"name": "deadpool",
|
||
"notes": "A dead simple async pool for connections and objects of any type."
|
||
}]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "cli-tools",
|
||
"name": "CLIs",
|
||
"subgroups": [
|
||
{
|
||
"slug": "argument-parsing",
|
||
"name": "Argument Parsing",
|
||
"description": "See <a target=\"_blank\" href=\"https://github.com/rust-cli/argparse-benchmarks-rs\">argparse-benchmarks-rs</a> for a full comparison of the crates mentioned here and more.",
|
||
"purposes": [
|
||
{
|
||
"name": "Fully-featured",
|
||
"recommendations": [{
|
||
"name": "clap",
|
||
"notes": "Ergonomic, battle-tested, includes the kitchen sink, and is fast at runtime. However compile times can be slow"
|
||
}],
|
||
"see_also": [{
|
||
"name": "bpaf",
|
||
"notes": "Fast compile times than clap while still being featureful. But still has some rough edges, and the API can be confusing at times."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Minimal",
|
||
"recommendations": [{
|
||
"name": "lexopt",
|
||
"notes": "Fast compile times, fast runtime, pedantic about correctness. API is less ergonomic"
|
||
}, {
|
||
"name": "pico-args",
|
||
"notes": "Fast compile times, fast runtime, more lax about correctness. API is more ergonomic"
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "utility",
|
||
"name": "Utility",
|
||
"description": "Helpers that are often useful when implementing CLIs",
|
||
"purposes": [
|
||
{
|
||
"name": "Globbing",
|
||
"recommendations": [{
|
||
"name": "globset",
|
||
"notes": "High-performance globbing that allows multiple globs to be evaluated at once"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Directory walking",
|
||
"recommendations": [{
|
||
"name": "walkdir",
|
||
"notes": "Basic recursive filesystem walking."
|
||
}, {
|
||
"name": "ignore",
|
||
"notes": "Recursive filesystem walking that respects ignore files (like .gitignore)"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Filesystem helpers",
|
||
"recommendations": [{
|
||
"name": "fs_extra",
|
||
"notes": "Recursively move, copy, and delete the files in a directory"
|
||
}]
|
||
},
|
||
{
|
||
"name": "File watching",
|
||
"recommendations": [{
|
||
"name": "notify",
|
||
"notes": "Watch files or directories and execute a function when they change"
|
||
}]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "rendering",
|
||
"name": "Terminal Rendering",
|
||
"description": "For fancy terminal rendering and TUIs. The crates recommended here work cross-platform (including windows).",
|
||
"purposes": [
|
||
{
|
||
"name": "Coloured Output",
|
||
"recommendations": [{
|
||
"name": "termcolor",
|
||
"notes": "Cross-platform terminal colour output"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Progress indicators",
|
||
"recommendations": [{
|
||
"name": "indicatif",
|
||
"notes": "Progress bars and spinners"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Full TUI library",
|
||
"recommendations": [{
|
||
"name": "crossterm",
|
||
"notes": "Cross-platform terminal rendering and event handling"
|
||
}]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
},
|
||
{
|
||
"slug": "concurrency",
|
||
"name": "Concurrency",
|
||
"subgroups": [
|
||
{
|
||
"slug": "data-structures",
|
||
"name": "Data Structures",
|
||
"purposes": [
|
||
{
|
||
"name": "Mutex",
|
||
"recommendations": [{
|
||
"name": "parking_lot",
|
||
"notes": "std::mutex also works fine. But Parking Lot is faster."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Atomic pointer swapping",
|
||
"recommendations": [{
|
||
"name": "arc_swap",
|
||
"notes": "Useful for sharing data that has many readers but few writers"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Concurrent HashMap",
|
||
"notes": "See <a target=\"_blank\" href=\"https://github.com/xacrimon/conc-map-bench\">conc-map-bench</a> for comparative benchmarks of concurrent HashMaps.",
|
||
"recommendations": [{
|
||
"name": "dashmap",
|
||
"notes": "The fastest for general purpose workloads"
|
||
}, {
|
||
"name": "flurry",
|
||
"notes": "Particularly good for read-heavy workloads."
|
||
}]
|
||
},
|
||
{
|
||
"name": "Channels",
|
||
"notes": "See <a href=\"https://docs.rs/tokio/latest/tokio/sync/mpsc/index.html#communicating-between-sync-and-async-code\">communicating-between-sync-and-async-code</a> for notes on when to use async-specific channels vs general purpose channels.",
|
||
"recommendations": [
|
||
{
|
||
"name": "crossbeam_channel",
|
||
"notes": "The absolute fastest channel implementation available. Implements Go-like 'select' feature."
|
||
}, {
|
||
"name": "flume",
|
||
"notes": "Smaller and simpler than crossbeam_channel and almost as fast"
|
||
},
|
||
{
|
||
"name": "postage",
|
||
"notes": "Channels that integrate nicely with async code"
|
||
}]
|
||
},
|
||
{
|
||
"name": "Parallel computation",
|
||
"recommendations": [
|
||
{
|
||
"name": "rayon",
|
||
"notes": "Convert sequential computation into parallel computation with one call - `par_iter` instead of `iter`"
|
||
}]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|
||
]
|
||
}
|