valence/Cargo.toml
Ryan Johnson 6338fc6300
serde support for valence_nbt + fixes. (#352)
## Description

- Reorganize `valence_nbt` and feature flag the different parts. SNBT
and binary serialization are each behind their own flags.
- Add optional serde support to `valence_nbt` behind the `serde` flag.
This is useful for end users working with `valence_nbt` and allows us to
simplify some code in `valence_biome` and `valence_dimension`.

Note that this includes a `Serializer` and `Deserializer` for `Compound`
and _not_ the binary and SNBT formats. In other words, it's not possible
to go directly from an arbitrary data format to binary NBT and vice
versa, but it _is_ possible to go to and from `Compound` and finish the
(de)serialization this way. I consider this an acceptable compromise
because writing fast and correct serialization routines for `Compound`
becomes more difficult when serde is in the way. Besides, the
intermediate `Compound` often needs to be created anyway.
- Fixed unsound uses of `std::mem::transmute` in `valence_nbt` and
elsewhere. Using `transmute` to cast between slice types is unsound
because slices are `#[repr(Rust)]` and the layouts are not guaranteed.
`slice::from_raw_parts` is used as the replacement.
2023-06-04 05:56:10 -07:00

100 lines
2.7 KiB
TOML

[workspace]
members = ["crates/*", "tools/*"]
exclude = ["rust-mc-bot", "tools/stresser", "tools/packet_inspector"]
resolver = "2"
[workspace.package]
version = "0.2.0-dev+mc.1.19.4"
edition = "2021"
repository = "https://github.com/valence-rs/valence"
documentation = "https://docs.rs/valence/"
license = "MIT"
[workspace.dependencies]
aes = "0.8.2"
anyhow = "1.0.70"
approx = "0.5.1"
arrayvec = "0.7.2"
async-trait = "0.1.60"
atty = "0.2.14"
base64 = "0.21.0"
bevy_app = { version = "0.10.1", default-features = false }
bevy_ecs = { version = "0.10.1", default-features = false, features = ["trace"] }
bevy_hierarchy = { version = "0.10.1", default-features = false }
bevy_mod_debugdump = "0.7.0"
bitfield-struct = "0.3.1"
byteorder = "1.4.3"
bytes = "1.2.1"
cesu8 = "1.1.0"
cfb8 = "0.8.1"
clap = { version = "4.0.30", features = ["derive"] }
criterion = "0.4.0"
directories = "5.0.0"
eframe = { version = "0.21.0", default-features = false }
egui = "0.21.0"
enum-map = "2.4.2"
flate2 = "1.0.24"
flume = "0.10.14"
fs_extra = "1.2.0"
glam = "0.23.0"
heck = "0.4.0"
hmac = "0.12.1"
indexmap = "1.9.3"
noise = "0.8.2"
num = "0.4.0"
num-bigint = "0.4.3"
num-integer = "0.1.45"
owo-colors = "3.5.0"
parking_lot = "0.12.1"
paste = "1.0.11"
pretty_assertions = "1.3.0"
proc-macro2 = "1.0.56"
quote = "1.0.26"
rand = "0.8.5"
rayon = "1.7.0"
regex = "1.6.0"
reqwest = { version = "0.11.12", default-features = false }
rfd = "0.11.3"
rsa = "0.7.2"
rsa-der = "0.3.0"
rustc-hash = "1.1.0"
serde = "1.0.160"
serde_json = "1.0.96"
sha1 = "0.10.5"
sha2 = "0.10.6"
syn = "2.0.15"
syntect = { version = "5.0.0", default-features = false }
tempfile = "3.3.0"
thiserror = "1.0.40"
time = "0.3.17"
tokio = { version = "1.27.0", features = ["full"] }
toml = "0.7.2"
tracing = "0.1.37"
tracing-subscriber = "0.3.16"
url = { version = "2.2.2", features = ["serde"] }
uuid = "1.3.1"
valence_advancement.path = "crates/valence_advancement"
valence_anvil.path = "crates/valence_anvil"
valence_biome.path = "crates/valence_biome"
valence_block.path = "crates/valence_block"
valence_build_utils.path = "crates/valence_build_utils"
valence_client.path = "crates/valence_client"
valence_core_macros.path = "crates/valence_core_macros"
valence_core.path = "crates/valence_core"
valence_dimension.path = "crates/valence_dimension"
valence_entity.path = "crates/valence_entity"
valence_instance.path = "crates/valence_instance"
valence_inventory.path = "crates/valence_inventory"
valence_nbt = { path = "crates/valence_nbt" }
valence_network.path = "crates/valence_network"
valence_player_list.path = "crates/valence_player_list"
valence_registry.path = "crates/valence_registry"
valence.path = "crates/valence"
zip = "0.6.3"
[profile.dev.package."*"]
opt-level = 3
[profile.dev]
opt-level = 1