Rust
Release Date: Sept 5, 2024
No Rust Specific Changes
Release Date: Aug 28, 2024
The Ditto 4.8.0 Rust SDK release brings significant reliability enhancements, ensuring that Rust now stands on par with our other supported languages. This update focuses on stabilizing key features and improving overall performance, making the Rust SDK more robust and dependable for developers. Whether you’re building new projects or maintaining existing ones, these enhancements will provide a smoother and more consistent experience.
⭐️ ➕ Added: BLE support on macOS #12639
⭐️ ➕ Added: DittoLogger type, and moved all the Ditto logging APIs to it #12793
⭐️ ➕ Added: function export_to_file() to DittoLogger, which exports collected logs to a compressed and JSON-encoded file on the local file system. Logs returned through this method are at DEBUG log level. This new API can be used to do forensic log gathering on a device. Logs are always collected and restricted to a fixed specific size limit to ensure they don't grow endlessly. Once the size limit has reached new logs replace the oldest logs. #11961
➕ Added: Store::new_attachment_from_bytes function for creating a new attachment from in-memory data #12548
➕ Added: Properties peer_key_string1 and peer_key_string2 on Connection replacing the deprecated properties peer1 and peer2 #12799
➕ Added: PartialEq implementation for Peer and PresenceGraph #12943
➕ Added: V3ConnectionType public type to allow internal access to a presence peer's connection type. #12945
➕ Added: Documentation for start_sync() and disable_sync_with_v3() to include a recommendation for performance improvement. #13098
➕ Added: Documentation for property peer_metadata on Peer to add information about how the property behaves over the lifecycle of the PresenceGraph #13479
➕ Added: Connection type replacing the UndirectedConnection type.
➕ Added: register_observer_with_signal_next API to the Ditto store namespace to allow for users to control observer callback rate in advanced usage scenarios. #13397
🔄 Changed: The format of logs emitted by the Rust SDK is now more consistent #12557
⭐️ 🛠️ Fixed: Ditto Rust SDK no longer requires a fixed version of Rust. Previously users of Rust needed to bind their Rust version to the version used by Ditto. Going forward this is not longer the case and users need only support the minimum version of Rust required by the Ditto SDK.
🛠️ Fixed: register_observer delivering the same events multiple times #13397
🛠️ Fixed: Static linking issues that used to require setting LIBDITTO_STATIC_AMEND_WITH=objcopy #12203
🛠️ Fixed: mDNS not advertising on macOS #12639
🛠️ Fixed: Various improvements to the error module and types in the API #12793
🛠️ Fixed: Rust SDK may create an extra unneeded TCP listener when peer-to-peer LAN sync is enabled #13497
🛠️ Fixed (Linux): Increased mDNS multicast TTL from 1 to 255 to allow for cross-VLAN announcements #13590
⚠️ Deprecated: LIBDITTO_STATIC_AMEND_WITH build.rs script environment variable, since the reason why it was previously needed have been resolved #12203
⚠️ Deprecated: ErrorKind::as_str() API. Please use its Display implementation instead. #12793
⚠️ Deprecated: The logging APIs on the Ditto type. Use the DittoLogger instead. #12793
⚠️ Deprecated: Properties peer1 and peer2 on Connection, please use peer_key_string1 and peer_key_string2 instead #12799
❗️🗑️ Removed: A few APIs and types unitentially exposed under ::dittolive_ditto::error. #12793
❗️⛓️💥 Breaking change: transports::v3::ConnectionType moved to transports::ConnectionType, please update any necessary imports. This was necessary because transports::v3::ConnectionType was a stop gap solution to resolve an immediate customer pain point.
❗️⛓️💥 Breaking change: UndirectedConnection type renamed to Connection.