# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "trojan-rules"
version = "0.9.1"
authors = ["trojan-rust <164051043+trojan-rust@users.noreply.github.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rule-based routing engine for trojan-rs (Surge/Clash compatible)"
homepage = "https://github.com/trojan-rust/trojan-rust"
documentation = "https://docs.rs/trojan"
readme = "README.md"
keywords = [
    "rules",
    "routing",
    "surge",
    "clash",
]
categories = ["network-programming"]
license = "GPL-3.0-only"
repository = "https://github.com/trojan-rust/trojan-rust"
resolver = "2"

[features]
default = [
    "geoip",
    "http",
]
geoip = ["maxminddb"]
http = [
    "reqwest",
    "tokio",
    "tokio-util",
]

[lib]
name = "trojan_rules"
path = "src/lib.rs"

[dependencies.aho-corasick]
version = "1"

[dependencies.arc-swap]
version = "1"

[dependencies.ipnet]
version = "2"

[dependencies.maxminddb]
version = "0.27"
optional = true

[dependencies.reqwest]
version = "0.12"
features = ["rustls-tls"]
optional = true
default-features = false

[dependencies.rustc-hash]
version = "2"

[dependencies.serde]
version = "1"
features = ["derive"]

[dependencies.serde_yaml]
version = "0.9"

[dependencies.thiserror]
version = "2"

[dependencies.tokio]
version = "1"
features = [
    "fs",
    "time",
    "sync",
]
optional = true

[dependencies.tokio-util]
version = "0.7"
optional = true

[dependencies.tracing]
version = "0.1"

[dependencies.trojan-config]
version = "0.9.1"

[lints.clippy]
assertions_on_result_states = "warn"
cast_possible_truncation = "warn"
cast_possible_wrap = "warn"
cast_sign_loss = "warn"
error_impl_error = "warn"
exit = "warn"
or_fun_call = "warn"
ptr_as_ptr = "warn"
tests_outside_test_module = "warn"
undocumented_unsafe_blocks = "warn"

[lints.rust]
missing_debug_implementations = "warn"
