{"repo":"reeywhaar/nut","free":true,"listed":false,"github":"https://github.com/reeywhaar/nut","clone":"git clone https://github.com/reeywhaar/nut.git","description":"Port of Bolt DB in Rust","language":"Rust","stars":46,"topics":["database","embed","rust","key-value-store"],"license":"MIT","category":"databases-storage","readme_excerpt":"Nut Port of Bolt DB in Rust - Compatible with Bolt's database format and provides similar api. Since Nut supports same format as Bolt there are known issues: - Bolt uses Memmap to operate, there is no LRU or other cache, so if database doesn't fit in memory, then it's end of game, Nut will inevitably crash. - Data structures are written directly onto disk. No serialization takes place, so Nut doesn't understand db file from computer with different Endianness, for example. - Transaction based . In case of error transaction will be rolled back. - Multiple readers, single writer. Nut works just like Bolt: you can have one writer and multiple readers at a time, just be sure they run on different threads. Making writer and reader transaction in same thread will cause deadlock. Writer can write freely if memory map is have enough free pages, in other case it will be waiting for reading transactions to close. Usage Package available at crates.io: https://crates.io/crates/nut Documentation available at https://docs.rs/nut/0.1.2/nut/ Usual way is to cargo build --release in console. Docs available via cargo doc --no-deps --open . Api is very similar to Bolt if you are familiar with it. Examples Create db and put something Note: All buckets obtained from transaction should be dropped before calling either rollback or commit . Getting data back Getting available buckets Nut Bin Crate also provides nut binary which is helpful to inspect database file in various ways. It can be found afte","default_branch":null,"files":null,"tree":[],"storefront":"/r/reeywhaar","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/reeywhaar/nut/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}