mmtkvdb
mmtkvdb
is a crate for Rust which provides a memory-mapped key-value
database. It uses LMDB and links with an existing liblmdb
on the system.
Safety
Because of how memory-mapped I/O is being used and also because of certain
assumptions of the underlying LMDB API, opening environments and databases
requires unsafe
Rust (i.e. the programmer must ensure that certain
preconditions are met that cannot be enforced by the compiler to avoid
undefined behavior). If you aim to program in safe Rust only, this Rust
library is not suitable for you.
API Documentation
For documentation on how to use this crate, refer to the example in
src/lib.rs
.
License
See contained LICENSE
file (MIT License).
Changelog
- 2022-08-27: Version 0.8.2
- Removed wrong (unnecessary) bound
T: Storable
in implementation ofBorrowStorable for Vec<T>
(only[T]
needs to beStorable
) - Re-export
storable::BorrowStorable
in crate-level module (resulting in all items of modulestorable
being available at crate-level) - Directly use question mark operator in all examples
- Minor code style change (use
io::Result<_>
instead ofResult<_, io::Error>
)
- Removed wrong (unnecessary) bound
- 2022-07-22: Version 0.8.1
- Fix warning by removing
#![feature(core_ffi_c)]
, which is now stable - Removed unnecessary
Sized
supertrait ofStorable
- Some code cleanup (simplified bounds on GATs in
Storable
tuples)
- Fix warning by removing
- 2022-07-12: Version 0.8.0
- Trait
Ord
is no longer required forStorable
types. - Use
deref_owned
version 0.10.1 - Improved documentation
- Bugfixes
- The constant
Storable::TRIVIAL_CMP
was set to true for signed byte slices, which led to wrong comparisons of keys or duplicate values. - The macro
impl_ord_for_storable
was broken. The macro is no longer needed and has been removed, thus the bug does not exist anymore.
- The constant
- Changed re-exports
- A new module
cow
has been added, which re-exports items from cratederef_owned
. - All relevant items are now re-exported by the crate-level module as well.
- A new module
- Code cleanup
- Internal macros in
storable
module have been cleaned up. - Cleaner implementation for
BorrowStorable
which allowed removing the privateIsType
trait and the publicStorableWithOwned
trait. - Consistent use of
GenericCow
where applicable
- Internal macros in
- Added more tests
- Trait
For older changes, refer to the CHANGELOG.md
file.