Last active
October 9, 2024 18:36
-
-
Save ryanpeach/bb6734cd0596866def07f1cdc4dd10d6 to your computer and use it in GitHub Desktop.
My favorite rust packages and settings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[profile.dev] | |
opt-level = 0 | |
debug = true | |
[profile.release] | |
opt-level = 3 | |
debug = false | |
[dependencies] | |
# Errors | |
anyhow = "1.0.86" | |
thiserror = "1.0.63" | |
miette # Print errors like rust does | |
# Derivers | |
bon | |
getset = "0.1.2" | |
educe # Like derive_more but better | |
validator # Like pydantic | |
soa_derive # Struct of Arrays and Array of Struct converter | |
# CLI and Config | |
clap # Create CLI's | |
serde # Serialization | |
serde_derive | |
serde_yaml | |
serde_json | |
serde_toml | |
tracing | |
# Iteration | |
rayon = "1.8.0" # Parallelize anything | |
itertools = "0.12.1" # Like in python | |
indicatif # Progress Bar | |
# Numbers | |
ndarray = { version = "0.15.6", features = ["rayon", "serde", "blas"] } | |
rand = "0.8.5" | |
ordered-float # NotNaN and OrderedFloat for sorting | |
uom # Compile Time Units of Measure (Like meters, seconds, etc) | |
conv # Better conversions | |
# Faster than default | |
iota # Prints Integers faster | |
ryu # Prints floats faster | |
hashbrown = { version = "0.14.2", features = ["rayon", "ahash"] } # Faster hashmap | |
# Enums and Strings | |
strum = "0.25.0" | |
strum_macros = "0.25.3" | |
[dev-dependencies] | |
just = "1.23.0" | |
pretty_assertions | |
proptest | |
iai-callgrind = "0.14.0" | |
[[bench]] | |
name = "bench_main" | |
harness = false | |
[profile.bench] | |
debug = true | |
[toolchain] | |
channel = "stable" | |
components = ["clippy"] | |
[lints.rust] | |
missing_docs = "deny" | |
[lints.rustdoc] | |
missing_crate_level_docs = "warn" | |
unescaped_backticks = "warn" | |
private_intra_doc_links = "allow" | |
[lints.clippy] | |
# Enable specific Clippy lints | |
pedantic = { level = "warn", priority = -1 } | |
unwrap_used = "warn" | |
panic = "warn" | |
trivially_copy_pass_by_ref = "warn" | |
inefficient_to_string = "warn" | |
missing_docs_in_private_items = "warn" | |
doc_markdown = "warn" | |
missing_fields_in_debug = "warn" | |
redundant_clone = "warn" | |
# Deny these lints | |
cast_possible_truncation = "deny" | |
cast_precision_loss = "deny" | |
# Allow these lints | |
too_many_lines = "allow" | |
missing_errors_doc = "allow" | |
similar_names = "allow" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://www.reddit.com/r/rust/comments/17zxyku/what_are_the_rust_crates_you_use_in_almost_every/