findnerd 0.1.1

Semantic search for Nerd Font glyphs
[package]
name = "findnerd"
version = "0.1.1"
edition = "2024"
description = "Semantic search for Nerd Font glyphs"
repository = "https://github.com/can1357/findnerd"
readme = "README.md"
keywords = ["nerd-fonts", "icons", "glyphs", "search", "cli"]
categories = ["command-line-utilities"]
license = "MIT"
rust-version = "1.94.0"
# The 29 MB potion-base-8M model blows the crates.io size cap; default builds
# download it on first run (see src/model_cache.rs). `embed-model` therefore
# only works from a git checkout.
exclude = ["assets/model", ".github", "scripts"]

[features]
default = ["fetch-model"]
# Download the pinned potion-base-8M model to the user cache on first run.
fetch-model = ["dep:dirs", "dep:sha2", "dep:ureq"]
# Compile the model into the binary for a fully offline executable.
embed-model = []

[dependencies]
anyhow = "1.0.98"
base64 = "0.22.1"
clap = { version = "4.5.40", features = ["derive"] }
crossterm = "0.28.1"
dirs = { version = "6.0.0", optional = true }
fuzzy-matcher = "0.3.7"
model2vec-rs = { version = "0.2.1", default-features = false, features = ["local-only", "onig"] }
ratatui = "0.29.0"
rusqlite = { version = "0.37.0", features = ["bundled", "serialize"] }
serde = { version = "1.0.219", features = ["derive"] }
serde_json = "1.0.140"
sha2 = { version = "0.10.9", optional = true }
unicode-segmentation = "1.12.0"
unicode-width = "0.2.0"
ureq = { version = "3.1.2", optional = true }

[lints.rust]
# ──────────────────────────────────────────────────────────────────────────────
# Rust Lint Levels
# ──────────────────────────────────────────────────────────────────────────────
mismatched_lifetime_syntaxes = "allow"

[lints.clippy]
# ──────────────────────────────────────────────────────────────────────────────
# Base Lint Levels
# ──────────────────────────────────────────────────────────────────────────────
all = { level = "warn", priority = -1 }
correctness = { level = "deny", priority = -1 }
nursery = { level = "warn", priority = -1 }
pedantic = { level = "warn", priority = -1 }
perf = { level = "warn", priority = -1 }
style = { level = "warn", priority = -1 }
suspicious = { level = "deny", priority = -1 }

# ──────────────────────────────────────────────────────────────────────────────
# Meta: Lint Attributes
# ──────────────────────────────────────────────────────────────────────────────
allow_attributes_without_reason = "warn" # Enforce reason for all #[allow]

# ──────────────────────────────────────────────────────────────────────────────
# Safety & Unsafe Code
# ──────────────────────────────────────────────────────────────────────────────
borrow_as_ptr = "allow"
cast_ptr_alignment = "allow"
ptr_as_ptr = "allow"
ref_as_ptr = "allow"
undocumented_unsafe_blocks = "warn"
unsafe_derive_deserialize = "allow"

# ──────────────────────────────────────────────────────────────────────────────
# Numeric Casts & Conversions
# ──────────────────────────────────────────────────────────────────────────────
cast_lossless = "allow"            # u32 as u64 - 'as' is cleaner than From
cast_possible_truncation = "allow" # u64 as u32 - often intentional
cast_possible_wrap = "allow"       # u32 as i32 - can be intentional
cast_precision_loss = "allow"      # f64 as f32 - sometimes acceptable
cast_sign_loss = "allow"           # i32 as u32 - sometimes needed
tuple_array_conversions = "allow"  # Non-Into conversion is more clear

# ──────────────────────────────────────────────────────────────────────────────
# Floating Point
# ──────────────────────────────────────────────────────────────────────────────
float_cmp = "allow" # Tests mostly do this + we know what we're doing

# ──────────────────────────────────────────────────────────────────────────────
# Functions & Closures
# ──────────────────────────────────────────────────────────────────────────────
inline_always = "allow"                      # Needed for performance-critical code
must_use_candidate = "allow"                 # Not every function needs #[must_use]
needless_pass_by_value = "allow"
redundant_closure_for_method_calls = "allow" # .map(ToString::to_string) can be clearer
return_self_not_must_use = "allow"           # Builder pattern methods

# ──────────────────────────────────────────────────────────────────────────────
# Structs & Types
# ──────────────────────────────────────────────────────────────────────────────
inconsistent_struct_constructor = "allow"
missing_fields_in_debug = "allow"         # Not every field needs to be in Debug output
struct_excessive_bools = "allow"          # Usually with builders

# ──────────────────────────────────────────────────────────────────────────────
# Pattern Matching
# ──────────────────────────────────────────────────────────────────────────────
match_same_arms = "allow"                    # Can be intentional for clarity
match_wildcard_for_single_variants = "allow" # _ can be clearer than listing variants
option_if_let_else = "allow"                 # match/if-let-else often clearer

# ──────────────────────────────────────────────────────────────────────────────
# Imports & Module Organization
# ──────────────────────────────────────────────────────────────────────────────
enum_glob_use = "allow"
items_after_statements = "allow" # Sometimes more readable
wildcard_imports = "allow"       # Cleaner for preludes and test modules

# ──────────────────────────────────────────────────────────────────────────────
# Variables & Type Inference
# ──────────────────────────────────────────────────────────────────────────────
let_underscore_untyped = "allow" # Type obvious from context
similar_names = "allow"          # 'req' and 'res' together are fine

# ──────────────────────────────────────────────────────────────────────────────
# Literals & Formatting
# ──────────────────────────────────────────────────────────────────────────────
unreadable_literal = "allow" # 10_000_000 vs 0xDEADBEEF is context dependent
verbose_bit_mask = "allow"   # Explicit bit patterns can be clearer than hex

# ──────────────────────────────────────────────────────────────────────────────
# Code Style
# ──────────────────────────────────────────────────────────────────────────────
default_trait_access = "allow"        # Default::default() sometimes clearer
significant_drop_tightening = "allow" # We pay attention to this already

# ──────────────────────────────────────────────────────────────────────────────
# Documentation
# ──────────────────────────────────────────────────────────────────────────────
missing_errors_doc = "allow" # Documenting every error return is often redundant
missing_panics_doc = "allow" # Not every panic needs docs, especially assert!

# ──────────────────────────────────────────────────────────────────────────────
# Complexity
# ──────────────────────────────────────────────────────────────────────────────
too_many_arguments = "allow" # Argument count is rarely the real complexity signal
too_many_lines = "allow"     # Arbitrary limits don't account for necessary complexity

[profile.release]
lto = "thin"
codegen-units = 1
strip = true