routers_codec 0.2.1

Encoding and Decoding Primitives for Routers
Documentation
[package]
name = "routers_codec"
version = "0.2.1"
edition = "2024"
include = ["docs/**", "build.rs", "proto/**", "src/**"]
description = "Encoding and Decoding Primitives for Routers"
license = "GPL-3.0-or-later"
repository = "https://github.com/routers-org/routers"

[lib]
name = "routers_codec"
path = "./src/lib.rs"
bench = false

[dependencies]
# Sister Crates
routers_network = { workspace = true }
schema = { workspace = true }

# GeoRust
geo = { workspace = true, features = ["serde"] }
petgraph = { workspace = true, features = ["serde"] }

serde = { workspace = true }
rayon = { workspace = true }
log = { workspace = true }
postcard = { workspace = true }
rustc-hash = "2.1.1"

# Tracing
tracing = { workspace = true, optional = true }
tracing-subscriber = { workspace = true, optional = true }
strum = { workspace = true }
itertools = { workspace = true }

# OSM Reader
flate2 = { version = "1.1.9", features = ["zlib-rs"], optional = true }
bytes = { workspace = true, optional = true }
buffa = { workspace = true, optional = true }

# Overture / GeoParquet reader
arrow = { version = "59", optional = true }
parquet = { version = "59", optional = true }
serde_arrow = { version = "0.15", features = ["arrow-59"], optional = true }
wkb = { version = "0.9", optional = true }
geo-traits = { version = "0.3", optional = true }

# Drop-in for `std::time::Instant`
web-time = "1"

# Misc.
# TODO: Remove dependency.
either = "1.15.0"
regex = "1.11.1"
bitflags = "2.9.1"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
mimalloc = { version = "0.1.46", optional = true }

[dev-dependencies]
routers_fixtures = { workspace = true }

test-log = { workspace = true }
criterion = { workspace = true }

# Used to compare performance to ensure no large regression
osmpbf = { version = "0.3.5", features = ["rust-zlib"], default-features = false }

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

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

[features]
default = ["mimalloc"]

# Overture Maps GeoParquet ingestion (pulls in the Arrow/Parquet reader stack).
overture = ["dep:arrow", "dep:parquet", "dep:serde_arrow", "dep:wkb", "dep:geo-traits"]

# Open Street Maps (via. OSM-Protobuf files)
osm = ["dep:flate2", "dep:bytes", "dep:buffa"]

# Alternate Allocator (Applies to #[global_allocator])
mimalloc = ["dep:mimalloc"]

# Tracing (For Debugging & Logging)
tracing = ["dep:tracing", "dep:tracing-subscriber"]

[lints]
workspace = true