Expand description
Yrs “wires” is a high performance CRDT implementation based on the idea of Shared Types. It is a compatible port of the Yjs CRDT.
Shared Types work just like normal data types, but they automatically sync with other peers. In Rust, they can automatically sync with their counterparts in other threads.
A Shared Document is the access point to create shared types, and to listen to update events.
Implement a Provider
A provider connects to a shared document and automatically syncs updates through a medium. A provider could sync document updates to other peers through a network protocol, or sync document updates to a database so that they are available without a network connection. You can combine providers with each other to make your application more resilient.
In Yjs, we already have a rich collection of providers that allow you to build resilient applications that sync through multiple communication mediums all at once. We don’t have this ecosystem yet in Yrs, but you can build them easily on your own.
Re-exports
pub use crate::block::ID;pub use crate::observer::Observer;pub use crate::observer::Subscription;pub use crate::observer::SubscriptionId;pub use crate::types::array::Array;pub use crate::types::array::ArrayPrelim;pub use crate::types::array::ArrayRef;pub use crate::types::map::Map;pub use crate::types::map::MapPrelim;pub use crate::types::map::MapRef;pub use crate::types::text::Text;pub use crate::types::text::TextPrelim;pub use crate::types::text::TextRef;pub use crate::types::xml::Xml;pub use crate::types::xml::XmlElementPrelim;pub use crate::types::xml::XmlElementRef;pub use crate::types::xml::XmlFragment;pub use crate::types::xml::XmlFragmentPrelim;pub use crate::types::xml::XmlFragmentRef;pub use crate::types::xml::XmlNode;pub use crate::types::xml::XmlTextPrelim;pub use crate::types::xml::XmlTextRef;pub use crate::types::GetString;pub use crate::types::Observable;