Shipyard 0.11
Shipyard 0.11
lib.rs trim down
Keeping the docs.rs landing page at a manageable size is a balancing act. Not enough or too many items make it easy for new users to get lost.
This version reduces the number of items exported at the root from 70 to 41.
Nothing was removed but some items are now only exported in their module.
A new advanced module was also created for items that are rarely used. This is a bit of an experiment.
View serialization
Serializing views for a single use-case is not very complicated but there is no format that will satisfy everyone.
Some people might want the smallest serialized size when others might prefer speed. These goals don't align.
To solve this dilemma, shipyard now comes with a default format that is easy to write and the ability to customize it when needed.
Serializing multiple views can be expressed this way for example:
#[derive(Borrow, WorldBorrow, serde::Serialize, serde::Deserialize)]
struct LanguagesViewMut<'v> {
#[serde(borrow)]
entities: EntitiesViewMut<'v>,
#[serde(borrow)]
vm_name: ViewMut<'v, Name>,
#[serde(borrow)]
vm_favorite_language: ViewMut<'v, FavoriteLanguage>,
}