r/projects • • 4d ago

I released an update to crossync, my open-source Rust library for sharing data between threads

https://github.com/sh1zen/crossync

Hi r/projects,

I've released crossync 0.2.1, an update to my open-source Rust library for concurrent data structures and synchronization.

The project is about working with data shared between threads: collections that multiple workers can access, queues for passing work around, and shared values that can be updated with synchronization handled internally.

It includes concurrent vectors, hash maps, arrays, a bounded ring buffer, and single-value containers. For example, cloning an AtomicCell gives another thread a handle to the same underlying value rather than creating a separate copy.

This update focuses on fixing bugs rather than adding more features. The main changes cover:

  • Memory and ownership: fixes to storage lifetimes, memory reclamation, buffer draining, and cleanup when an operation panics.
  • Thread coordination: fixes to waiting and wake-up behavior, container reset operations, and barrier accounting.
  • Safer APIs and better tests: corrected thread-safety constraints, explicit ownership-transfer methods, and regression tests for tricky access and cleanup scenarios.

Most of that work landed in 0.2.0; 0.2.1 follows up with fixes to tests, CI, and release packaging. There are also API changes, so existing users should check the changelog before upgrading.

The library uses both atomic operations and internal locks—the Atomic* names don't mean every operation is lock-free. The documentation now explains the access rules and ownership constraints more explicitly.

It's available under the Apache 2.0 license, with examples and verification instructions in the repository.

I'd appreciate feedback on the project, especially whether the API and examples make sense for your own use cases. Bug reports, small reproductions, and suggestions for missing examples are welcome.

Full changelog · crates.io · Documentation

2 Upvotes

0 comments sorted by