[package]
name = "veloren-world"
version = "0.10.0"
authors = ["Joshua Barretto <joshua.s.barretto@gmail.com>"]
edition = "2021"

[features]
use-dyn-lib = ["common-dynlib"]
be-dyn-lib = []
simd = ["vek/platform_intrinsics", "packed_simd"]
bin_compression = ["lz-fear", "deflate", "flate2", "image/jpeg", "num-traits", "fallible-iterator", "clap", "rstar"]

default = ["simd"]

[dependencies]
common = { package = "veloren-common", path = "../common" }
common_base = { package = "veloren-common-base", path = "../common/base"}
common-net = { package = "veloren-common-net", path = "../common/net" }
common-dynlib = {package = "veloren-common-dynlib", path = "../common/dynlib", optional = true}

bincode = { workspace = true }
bitvec = "1.0.1"
enum-map = { workspace = true }
enumset = "1.1.3"
fxhash = { workspace = true }
image = { workspace = true }
itertools = { workspace = true }
vek = { workspace = true }
noise = { version = "0.7", default-features = false }
num = { workspace = true }
ordered-float = { workspace = true }
hashbrown = { workspace = true }
lazy_static = { workspace = true }
tracing = { workspace = true }
rand = { workspace = true }
rand_chacha = { workspace = true }
arr_macro = "0.2.1"
packed_simd = { version = "0.3.9", optional = true }
rayon = { workspace = true }
serde = { workspace = true }
ron = { workspace = true }
inline_tweak = { workspace = true }
kiddo = "0.2"
strum = { workspace = true }

# compression benchmarks
lz-fear = { version = "0.1.1", optional = true }
deflate = { version = "1.0.0", optional = true }
flate2 = { version = "1.0.20", optional = true }
num-traits = { workspace = true, optional = true }
fallible-iterator = { version = "0.2.0", optional = true }
rstar = { version = "0.10", optional = true }
clap = { workspace = true, optional = true }


[dev-dependencies]
common-frontend = { package = "veloren-common-frontend", path = "../common/frontend" }
criterion = { version = "0.5.1", default-features=false, features=["rayon", "cargo_bench_support"]}
csv = "1.1.3"
tracing-subscriber = { version = "0.3.7", default-features = false, features = ["fmt", "time", "ansi", "smallvec", "env-filter"] }
minifb = "0.24"
rusqlite = { version = "0.28.0", features = ["array", "vtab", "bundled", "trace"] }
svg_fmt = "0.4"

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

[[example]]
name = "chunk_compression_benchmarks"
required-features = ["bin_compression"]

[[example]]
name = "world_generate_time"

[[example]]
name = "world_block_statistics"
required-features = ["bin_compression"]

[[example]]
name = "heightmap_visualization"
required-features = ["bin_compression"]
