naia-lib / naia

a cross-platform (including Wasm!) networking library built in Rust. Intended to make multiplayer game development dead-simple & lightning-fast
Apache License 2.0
911 stars 58 forks source link

The Serde trait is confusingly named #175

Closed Veritius closed 10 months ago

Veritius commented 1 year ago

Every time I see it, I think of the crate serde, which isn't helped by the fact the trait has nothing to do with serde. Maybe a name like Transmissible is better?

connorcarpenter commented 1 year ago

Hmm, so in my mind, in the Rust ecosystem, Serde is not only used for the serde crate, but used in a general sense for Serialization & deserialization functionality (look at all the crates with the name serde which are not related to the serde crate: https://crates.io/search?q=serde). Serialization and Deserialization to/from bit streams is all the Naia Serde trait & derive does (look at https://github.com/naia-lib/naia/blob/4070727125add8fee3c70e547c66243d45a33d56/shared/serde/src/serde.rs#L4).

The Naia Serde trait comes from the naia-serde crate (https://crates.io/crates/naia-serde), which is a heavily modified fork of https://crates.io/crates/nanoserde (which also has nothing to do with the serde crate)

I think that the naming makes sense in the context of the general usage of the term, but maybe theres a way we can communicate the meaning of this name better to users? Do you have any other suggestions?