tl;dr:

The `Catalog` is now thread-safe! This means you can safely share it across multiple threads. I also spent a good amount of time on API improvements, code cleanup, and, as always, squashing some bugs.

Thread Safety!

Hey everyone! It’s been a busy and exciting week, and I'm thrilled to share the latest progress. I hit a major milestone that I know many of you have been waiting for.

The Big One: Thread Safety

The headline feature this week is that the Catalog is now fully thread-safe. This has been a huge personal goal for the project for a while, and it’s finally here!

What does this mean for you? You can now wrap the Catalog in an Arc and share it across different threads without needing to wrap it in a Mutex or RwLock yourself. This is perfect for scenarios like web servers, data processing pipelines, or any application that uses concurrency.

To make this happen, I changed methods like upsert and persist to no longer require a mutable &mut self reference. They now operate on an immutable &self reference, handling the internal locking for you. As part of this, I've added a new suite of tests specifically designed to ensure everything is thread-safe and to prevent future regressions.

API Refinements and Housekeeping

Achieving thread safety had a few ripple effects, which gave me a great opportunity to do some house-cleaning.

First, I went through and restored the library examples, which needed updating after the API changes for thread safety. They should all be working again and serve as a good reference for the new patterns.

I also took a moment to review the public API for the entities. I’ve made the internal fields private to improve encapsulation. You can still get everything you need, like the id, through public methods. This makes the API safer and clearer to use.

Beyond that, I spent time on general project health:

It was a really productive week. Making the Catalog thread-safe is a huge step forward for the project, and I'm really happy with the API and code quality improvements that came along with it.

Thanks for following my progress. As always, feel free to grab the latest version and let me know what you think


Chore

Doc

Feat

Fix

Review

Test

Wip


tags: #rust, #devlog, #project:heave