Skip to content

Instantly share code, notes, and snippets.

@ryanpeach
Last active September 16, 2024 03:00
Show Gist options
  • Save ryanpeach/bb6734cd0596866def07f1cdc4dd10d6 to your computer and use it in GitHub Desktop.
Save ryanpeach/bb6734cd0596866def07f1cdc4dd10d6 to your computer and use it in GitHub Desktop.
My favorite rust packages and settings
[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]
criterion = { version = "0.4", features = ["html_reports"] }
just = "1.23.0"
pretty_assertions
proptest
[package.metadata.clippy]
# Enable specific Clippy lints
warn = [
"clippy::pedantic",
"clippy::unwrap_used",
"clippy::panic",
"clippy::trivially_copy_pass_by_ref",
"clippy::inefficient_to_string",
"missing_docs",
"clippy::missing_docs_in_private_items",
"clippy::doc_markdown",
"clippy::missing_errors_doc",
"clippy::missing_fields_in_debug",
"clippy::redundant_clone"
]
# Deny these lints
deny = [
"clippy::cast_possible_truncation",
"clippy::cast_precision_loss"
]
# Allow these lints
allow = [
"clippy::too_many_lines"
]
# Allow panic and unwrap in test code
allow-panic-in-tests = true
allow-unwrap-in-tests = true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment