[package] name = "srgn" version = "0.13.4" edition = "2021" authors = ["Alex Povel "] description = "A grep-like tool which understands source code syntax and allows for manipulation in addition to search" license = "MIT OR Apache-2.0" repository = "https://github.com/alexpovel/srgn" readme = "README.md" documentation = "https://docs.rs/srgn" keywords = ["grep", "grammars", "languages", "search", "manipulation"] categories = [ "command-line-utilities", "development-tools", "localization", "text-editors", "text-processing", ] rust-version = "1.80.0" exclude = [ # Contains large submodules; those should *not* be checked out when packaging for # crates.io, aka not end up being a problem, but protect against accidents "benches/", ] [dependencies] anyhow = { version = "1.0.92", features = ["backtrace"] } cached = { version = "0.53.1", optional = true, default-features = false, features = [ "ahash", "proc_macro", ] } clap = { version = "4.5.13", features = [ "derive", "env", "string", "wrap_help", ] } clap_complete = "4.5.13" colored = "2.1.0" const_format = "0.2.33" decompound = { version = "0.3.0", optional = true } env_logger = { version = "0.11.5", default-features = false, features = [ "auto-color", "humantime", ] } fancy-regex = "0.14.0" fst = { version = "0.4.7", optional = true } glob = "0.3.1" grep-cli = "0.1.11" ignore = "0.4.23" itertools = "0.13.0" log = "0.4.22" pathdiff = "0.2.1" tempfile = "3.13.0" titlecase = "3.3.0" tree-sitter = "0.23.0" tree-sitter-c = "0.23.1" tree-sitter-c-sharp = "0.23.0" tree-sitter-go = "0.23.1" tree-sitter-python = "0.23.2" tree-sitter-rust = "0.23.0" tree-sitter-typescript = "0.23.0" unescape = "0.1.0" unicode-normalization = "0.1.24" unicode_categories = "0.1.1" unicode_titlecase = "2.4.0" [features] all = ["german", "symbols"] default = ["all"] german = ["cached", "decompound", "fst"] symbols = [] [dev-dependencies] assert_cmd = "2.0.16" comrak = { version = "0.28.0", default-features = false } enum-iterator = "2.1.0" insta = { version = "1.41.1", features = ["yaml"] } nom = "7.1.3" predicates = { version = "3.1.2", default-features = false } pretty_assertions = "1.4.1" proptest = "1.5.0" rand = "0.8.5" rand_regex = "0.17.0" rstest = { version = "0.23.0", default-features = false } serde = { version = "1.0.214", features = ["derive"], default-features = false } [lints.clippy] pedantic = "warn" cargo = "warn" style = "warn" perf = "warn" complexity = "warn" correctness = "warn" nursery = "warn" suspicious = "warn" # Overrides multiple_crate_versions = { level = "allow", priority = 1 } module_name_repetitions = { level = "allow", priority = 1 } [lints.rust] # Just took everything at # https://doc.rust-lang.org/rustc/lints/listing/allowed-by-default.html # and made it more strict. Will perhaps get too annoying. absolute_paths_not_starting_with_crate = "warn" deprecated_safe = { level = "warn", priority = -1 } elided_lifetimes_in_paths = "warn" explicit_outlives_requirements = "warn" ffi_unwind_calls = "warn" # fuzzy_provenance_casts = "warn" # Unstable # impl_trait_overcaptures = "warn" # Unstable keyword-idents = "warn" keyword_idents_2018 = "warn" keyword_idents_2024 = "warn" let_underscore_drop = "warn" # lossy_provenance_casts = "warn" # Unstable macro_use_extern_crate = "warn" meta_variable_misuse = "warn" missing_abi = "warn" missing_copy_implementations = "warn" missing_debug_implementations = "warn" missing_docs = "warn" missing_unsafe_on_extern = "allow" # Switch back on once things are Rust 1.82+ everywhere # multiple_supertrait_upcastable = "warn" # Unstable # must_not_suspend = "warn" # Unstable non_ascii_idents = "warn" # non_exhaustive_omitted_patterns = "warn" # Unstable non_local_definitions = "warn" redundant_lifetimes = "warn" rust_2021_incompatible_closure_captures = "warn" rust_2021_incompatible_or_patterns = "warn" rust_2021_prefixes_incompatible_syntax = "warn" rust_2021_prelude_collisions = "warn" # rust_2024_incompatible_pat = "warn" # Unstable single_use_lifetimes = "warn" trivial_casts = "warn" trivial_numeric_casts = "warn" unit_bindings = "warn" unnameable_types = "warn" unreachable_pub = "allow" # Too noisy unsafe_code = "warn" unsafe_op_in_unsafe_fn = "warn" unstable_features = "warn" unused_crate_dependencies = "allow" unused_extern_crates = "allow" unused_import_braces = "warn" unused_lifetimes = "warn" unused_macro_rules = "warn" unused_qualifications = "warn" unused_results = "allow" # Too noisy variant_size_differences = "warn" [profile.dev.package.insta] # https://insta.rs/docs/quickstart/#optional-faster-runs opt-level = 3 [profile.dev.package.similar] # https://insta.rs/docs/quickstart/#optional-faster-runs opt-level = 3 [build-dependencies] cc = { version = "1.1.31", features = ["parallel"] } decompound = "0.3.0" fst = "0.4.7" rayon = "1.10.0" [package.metadata.binstall] pkg-url = "{ repo }/releases/download/{ name }-v{ version }/{ name }-{ target }{ archive-suffix }"