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
- 2023-02-13: Version 0.12.0
- The
Env
trait supports reference-to-reference conversion toEnvRo
, either throughAsRef<EnvRo>
, which is a supertrait ofEnv
now, or using the newEnv::as_env_ro
method.
- The
- 2023-02-12: Version 0.11.0
- Implement
Env
trait only forEnvRo
andEnvRw
, and no longer for everyT: AsRef<EnvRo>
- Implement
- 2023-02-11: Version 0.10.0
- Methods of
EnvRo
have been moved to a new traitEnv
, which is implemented for bothEnvRo
andEnvRw
. EnvRw
no longer implementsDeref<Target = EnvRo>
(but still implementsAsRef<EnvRo>
).- For convenience, a module
traits
has been added, which re-exports theEnv
,EnvRef
, andTxn
traits in unnameable form, such that by importingtraits::*
all trait methods will be in scope. EnvRef
is implemented for&T
whereT: Env
.
- Methods of
- 2023-02-09: Version 0.9.4
- Implement
AsRef<EnvRo>
forEnvRo
andEnvRw
- Implement
- 2023-02-07: Version 0.9.3
- Implement
Storable
trait for byte arrays ([u8; N]
)
- Implement
- 2023-02-06: Version 0.9.2
- Implement
Storable
trait for the unit type()
- Implement
- 2023-01-11: Version 0.9.1
- Added
EnvRef
trait which provides an abstraction over&EnvRo
and&mut EnvRw
- Added
- 2023-01-10: Version 0.9.0
- Renamed
DbOptions
toDbBuilder
- Provide type alias
DbSpec<K, V, C>
forDbBuilder
s which have a name (or the unnamed database) set - Use
bindgen
version 0.63 for building
- Renamed
For older changes, refer to the CHANGELOG.md
file.