This Rust library provides MmapedVec
;
a resizable, mutable array type implemented on top of
mmap()
,
providing a Vec
-like data structure
with persistence to disk built into it.
MmapedVec
is aimed at developers who wish to write software utilizing
data-oriented design
techniques in run-time environments where all of the following hold true:
Vec
-like data structure is appropriate for some
or all of your data, andThis library makes use of POSIX advisory locks on Unix platforms. POSIX advisory locks are not without problems. See for example this comment in the source code of SQLite for a good write-up about the kinds of problems the developers of SQLite see with POSIX advisory locks, and some pitfalls that one should be aware of.
Provided that your software runs in an environment where any process that attempts to open the files you are persisting your data to honor the advisory locks, and you take care not to open the same file multiple times within the same process (as per what was said in the comment linked above), everything will be fine and dandy :)
Read the docs to learn more about what this library is for and how you use it.
Don't forget to star persistence on GitHub if you find this library interesting or useful.