Skip to content

v 0.18

Latest
Compare
Choose a tag to compare
@Horusiath Horusiath released this 12 Mar 06:29
· 56 commits to main since this release

Yrs

  • New Observer API (#385): all subscription types now are described as a single yrs::Subscription type. observe methods no longer require mut ref to shared collection or document.
  • Hook and BranchID logical pointers (#393): collection refs such as ArrayRef, TextRef, MapRef now expose root and hook methods, that can be used to get a logical reference to a given type. This reference can later on be used to try to obtain an actual ref (it could also possibly return None if reference was already garbage collected).
  • Removed Doc::get_or_insert_xml_element and Doc::get_or_insert_xml_text - these types are not meant to be used as root level types and doing so may cause data loss due to limitations on how root-level types are represented in lib0 encoding.
  • Replaced rand crate with fastrand(#394): smaller binary size and better support for Web Assembly.
  • Moved Awareness and y-sync protocol into yrs::sync module (#395).
  • Changes in the internal representation of Doc updates (#365) - this should result in better performance and less memory used.

Ywasm

  • Rewritten the library. Shared types are now using logical pointer in order to avoid possible segfaults in WASM VM.
  • Removed Doc.getXmlText and Doc.getXmlElement- these types are not meant to be used as root level types and doing so may cause data loss due to limitations on how root-level types are represented in lib0 encoding. Use Doc.getXmlFragment instead and insert XML nodes into it.
  • YXmlText and YXmlElements can now be used as prelim types.
  • Removed xmlElement.insertXmlText/xmlElement.insertXmlElement: now there's a single xmlElement.insert method that can accept prelim versions of YXmlText and YXmlElement.
  • Logical pointers can now be accessed via ref.id property of shared collection types. They can be materialised back into refs via YTransaction.get method.

Yffi

  • Removed yxmlelem and yxmltext functions - these types are not meant to be used as root level types and doing so may cause data loss due to limitations on how root-level types are represented in lib0 encoding. Use yxmlfragment instead and insert XML nodes into it.
  • Replaced ytransaction_alive with ybranch_alive.
  • Exposed logical collection pointers via YBranchId - now Branch* can mapped back and forth to YBranchId through ybranch_id and ybranch_get functions. In case when Branch* has already been garbage collected and is no longer valid, ybranch_get will return NULL.