valence/crates
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
..
valence Move packets out of valence_core. (#335) 2023-05-29 01:36:11 -07:00
valence_advancement Move packets out of valence_core. (#335) 2023-05-29 01:36:11 -07:00
valence_anvil serde support for valence_nbt + fixes. (#352) 2023-06-04 05:56:10 -07:00
valence_biome Reorganize Project (#321) 2023-04-21 14:43:59 -07:00
valence_block Move packets out of valence_core. (#335) 2023-05-29 01:36:11 -07:00
valence_build_utils Reorganize Project (#321) 2023-04-21 14:43:59 -07:00
valence_client tag registry (#350) 2023-06-01 23:21:25 -07:00
valence_core serde support for valence_nbt + fixes. (#352) 2023-06-04 05:56:10 -07:00
valence_core_macros Move packets out of valence_core. (#335) 2023-05-29 01:36:11 -07:00
valence_dimension Reorganize Project (#321) 2023-04-21 14:43:59 -07:00
valence_entity Move packets out of valence_core. (#335) 2023-05-29 01:36:11 -07:00
valence_instance Move packets out of valence_core. (#335) 2023-05-29 01:36:11 -07:00
valence_inventory Move packets out of valence_core. (#335) 2023-05-29 01:36:11 -07:00
valence_nbt serde support for valence_nbt + fixes. (#352) 2023-06-04 05:56:10 -07:00
valence_network Move packets out of valence_core. (#335) 2023-05-29 01:36:11 -07:00
valence_player_list Move packets out of valence_core. (#335) 2023-05-29 01:36:11 -07:00
valence_registry serde support for valence_nbt + fixes. (#352) 2023-06-04 05:56:10 -07:00
valence_spatial_index Reorganize Project (#321) 2023-04-21 14:43:59 -07:00
README.md Advancement api (#329) 2023-05-02 01:35:35 -07:00

Crates

The standard crates used in Valence projects.

All crates here are exported by the main valence crate. valence is the intended interface for both end users and plugin authors.

Crates are versioned in lockstep with the exception of valence_nbt.

Ignoring transitive dependencies and valence_core, the dependency graph can be described like this:

graph TD
  network --> client
	client --> instance
	biome --> registry
	dimension --> registry
	instance --> biome
	instance --> dimension
	instance --> entity
	player_list --> client
	inventory --> client
	anvil --> instance
	entity --> block
	advancement --> client