# Vanth Vanth is a content-addressed database as a library designed for entity-component-system (ECS) applications. It is currently experimental and should not be used for anything. ## Library usage Any type that implements `serde::Serialize` can be hashed using `vanth::hash` to produce a `vanth::ContentHash`. ```rust let x = "hello"; assert_eq!(vanth::hash(&x).hex(), "ea8f163db38682925e4491c5e58d4bb3506ef8c14eb78a86e908c5624a67200f"); ``` Derive or implement the `vanth::Vanth` trait for types you want to store in the database. ```rust use serde::{Deserialize, Serialize}; use vanth::Vanth; #[derive(Deserialize, Serialize, Vanth)] struct Data { value: u32, } ``` This generates a method `Vanth::ty()` which returns a `vanth::Ty`. This should represent the type's fully qualified name - its module path followed by the type itself and any generics it has. E.g. `Data::