Anyone cares for a code review? I’ve just open sourced an event store I’ve built with Rust, here it is: https://github.com/bfil/exar-db It would be great to get some feedback from the community!
@Bastacyclop thanks for the tips! I actually missed rust-learning :(
Is there any efficient way to implement WeakMaps in Rust? Well, technically it's not WeakMap because Rust doesn't have GC and thus "weak" doesn't make much sense, but what I'm interested in is a way to store extra information on objects with O(1) lookup, where HashMap is not really the best solution.
Another way of looking into this would be "traits with data members".
To elaborate a little bit more - I'm going to store information associated with nodes in a tree retrieved from an external crate, so just adding data members is not really an option (without forking that crate just for this purpose); recreating entire tree but with wrappers around each node also seems too expensive (and requires lots of code to handle all kinds of nodes).
The only approach that seems to allow this so far is defining custom allocator which would reserve extra space on objects, but I'm not sure I want to go down that way and hope for a simpler solution.