> Baring bugs, this mdbm library should perform at roughly the same speed as the C library, but eliminate many very painful bug opportunities that require tools like Valgrind to debug.
Rust is awesome, but coming from usual languages is... frustrating. You need to internalize that the compiler _really_ knows better what's safe and what isn't and it takes a while.
It seems like this is the ideal use case for Rust. I understand the allure of type safety and everything that the Rust compiler can guarantee but I think the sheer difficulty and complexity it creates (and it does necessarily create complexity sometimes) makes it somewhat prohibitive. So maybe Rust's niche lies in smaller memory-sensitive roles?
While it's true it adds complexity, I actually think it's _easier_ than C or C++. This is because the compiler can help you reason about these things. In those languages, you are on your own.
Coming from a managed language, yes, it's a bit harder.
What I've found is that there's an initial hump, but then it gets easy. I haven't had a serious fight with the borrow checker in a while. I'd say I'm about 70% as productive with Rust as I am with Ruby, and most of that missing stuff is due to a lack of libraries, not due to the language itself.
I also am less likely to try the kinds of unsafe-but-i-know-they're-safe things that someone doing C++ for the last decade would, so that might bias my opinion.
> Baring bugs, this mdbm library should perform at roughly the same speed as the C library, but eliminate many very painful bug opportunities that require tools like Valgrind to debug.
This is exactly why I'm so excited about Rust.