[package]
name = "domi"
version = "0.1.0-alpha.24"
edition = "2024"
authors = ["チセ <123655015+chise0713@users.noreply.github.com>"]
repository = "https://github.com/chise0713/domi"
readme = true
license = "MIT OR Apache-2.0"
description = "domi provides abstractions and utilities for domain-list-community data source."
categories = ["parser-implementations", "parsing"]
keywords = ["parser", "domain", "v2ray", "sing-box"]

[package.metadata.docs.rs]
all-features = true
cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"]

[features]
default = ["serde", "rustc-hash"]
ahash = ["dep:ahash"]
rustc-hash = ["dep:rustc-hash"]
serde = ["dep:serde", "dep:serde_with"]
prost = ["dep:prost", "dep:prost-build"]
smallvec = ["dep:smallvec"]

[dependencies]
paste = "^1"

cfg-if = "^1.0"

# hasher
rustc-hash = { version = "^2", default-features = false, optional = true }
ahash = { version = "^0.8", default-features = false, features = [
    "no-rng",
], optional = true }

# reduce alloc when `Iterator.collect()`
smallvec = { version = "^1", optional = true }

# sing-box rule-set json source
serde_with = { version = "^3", default-features = false, features = [
    "macros",
], optional = true }
serde = { version = "^1", default-features = false, features = [
    "alloc",
    "derive",
], optional = true }

# v2ray protobuf
prost = { version = "^0.14", optional = true }

[build-dependencies]
prost-build = { version = "^0.14", optional = true }

[[example]]
doc-scrape-examples = true
name = "srs"
required-features = ["serde"]

[[example]]
name = "geosite"
required-features = ["prost"]

[dev-dependencies]
serde_json = "^1"
prost = "^0.14"
