rlibphonenumber 2.2.7

A high-performance Rust port of Google's libphonenumber for parsing, formatting, and validating international phone numbers.
Documentation
[package]
name = "rlibphonenumber"
version = "2.2.7"
edition = "2024"

rust-version = "1.88"
authors = ["Vladislav K. https://t.me/vloldik"]
description = "A high-performance Rust port of Google's libphonenumber for parsing, formatting, and validating international phone numbers."
repository = "https://github.com/vloldik/rlibphonenumber"
documentation = "https://docs.rs/rlibphonenumber"
readme.workspace = true
license = "Apache-2.0"
keywords = [
    "phone",
    "phonenumber",
    "libphonenumber",
    "validation",
    "formatting",
]
categories = [
    "parser-implementations",
    "text-processing",
    "internationalization",
]
build = "build/rust_build.rs"

[features]
default = ["builtin_metadata", "global_static", "regex", "protox"]

builtin_metadata = []
global_static = ["builtin_metadata"]

# Build-time only: compile the bundled `.proto` files with the pure-Rust
# `protox` compiler instead of requiring a system `protoc` binary. Enabled by
# default so a plain `cargo build` works with no external tooling. Turn it off
# (e.g. `default-features = false`) to fall back to prost-build's `protoc`
# invocation. This feature does not affect the crate's public API: prost-build
# generates identical Rust types from either path.
protox = ["dep:protox"]

regex = ["dep:regex"]
lite = ["dep:regex-lite"]

digest_mac = ["digest", "digest?/mac"]
digest = ["dep:digest"]
serde = ["global_static", "dep:serde"]

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


[dependencies]
prost = { workspace = true }

# logging standard in rust
log = "0.4"
# optimized concurrent map
dashmap = "5.5"
# just regex package
regex = { version = "1.10", optional = true }
regex-lite = { version = "0.1", optional = true }

thiserror = { workspace = true }

# for fast 0-alloc int to string conversion
itoa = "1.0"
# simple macro for single allocation concatenation of strings
fast-cat = "0.1"
# lib for derive enum iteration
strum = { version = "0.26", features = ["derive"] }
# Simple lib to converts any unicode valid chars into decimals
rlibphonenumber_macro = { path = "../rlibphonenumber_macro", version = "0.2" }
zeroes_itoa = { path = "../zeroes_itoa", version = "0.1" }

serde = { workspace = true, optional = true }

rustc-hash = { version = "2.1" }

digest = { version = "0.11", optional = true }

[build-dependencies]
thiserror = "1.0"
prost-build = "0.14"
# Pure-Rust protobuf compiler so building this crate does NOT require a system
# `protoc` binary. Gated behind the (default) `protox` feature; when disabled
# the build script falls back to prost-build's `protoc`-based `compile_protos`.
# protox parses/resolves the .proto files into a FileDescriptorSet, which
# prost-build then turns into Rust types via `Config::compile_fds`. protox 0.9
# targets prost-build 0.14.
protox = { version = "0.9", optional = true }
uniprops-gen = "0.3.5"

[dev-dependencies]
colog = "1.3"
env_logger = "0.11"
criterion = "0.5"
phonenumber = "0.3"
phonelib = "1.1.3"
serde_json = "1.0"

[[bench]]
name = "format_bench"
harness = false

[[bench]]
name = "parsing_bench"
harness = false

[[bench]]
name = "create_bench"
harness = false

[[bench]]
name = "matcher_bench"
harness = false