4 ms·
Nice blog post! I also wrote a concurrent reference counted cycle collector in Rust (https://github.com/chc4/samsara https://github.com/chc4/samsara, https://re
by chc4 3y ago
Nice blog post! I also wrote a concurrent reference counted cycle collector in Rust (https://github.com/chc4/samsara https://github.com/chc4/samsara, https://redvice.org/2023/samsara-garbage-collector/ https://redvice.org/2023/samsara-garbage-collector/) though never published it to crates.io. It's neat to see the different choices that people made implementing similar goals, and dumpster works pretty differently from how I did it. I hit the same problems wrt concurrent mutation of the graph when trying to count in-degree of nodes, or adding references during a collection - I didn't even think of doing generational references and just have a RwLock...
- claytonwramsey 3y agoThat's really cool! Thanks for the kind words. I remember peeking at it while hunting for collectors to benchmark against.
- nextaccountic 3y agoWhy not publish to crates.io? This seems useful
- chc4 3y agoHonest answer is mostly that I forgot; there was one more small TODO that I needed to fix before I wanted to publish it, and then I got busy and forgot about it.
- nextaccountic 3y agoYou can always publish unfinished crates as 0.0.1 version 0.0.x crates are special in that they can have breaking changes even in minor versions (so 0.0.1 isn't compatible with 0.0.2), so they convey a level of stability that is even less than a typical 0.1.x crate
- rezonant 3y agoMore generally, this is just semantic versioning. The first non-zero position is considered to have "major" impact, the following number is then a "minor" impact. https://docs.rs/semver/latest/semver/ https://docs.rs/semver/latest/semver/
- nextaccountic 3y agoNote that Cargo is a bit more strict than semver because Cargo consider that 0.1.2 must be compatible with 0.1.1 (for instance) but semver says that for any x and y, 0.x.y anything goes. However, 0.0.1 is not compatible with 0.0.2 (like semver) I couldn't find documentation on that but here's a reddit thread about it https://www.reddit.com/r/rust/comments/n4ni2d/arent_many_rust_crates_abusing_semantic_versioning/gwwixyq/ https://www.reddit.com/r/rust/comments/n4ni2d/arent_many_rus...