Git Product home page Git Product logo

leveldb-rs's Introduction

leveldb-rs

crates.io Travis CI

A fully compatible implementation of LevelDB in Rust. (any incompatibility is a bug!)

The implementation is very close to the original; often, you can see the same algorithm translated 1:1, and class (struct) and method names are similar or the same.

NOTE: I do not endorse using this library for any data that you care about. I do care, however, about bug reports.

Status

  • User-facing methods exist: Read/Write/Delete; snapshots; iteration
  • Compaction is supported, including manual ones.
  • Fully synchronous: Efficiency gains by using non-atomic types, but writes may occasionally block during a compaction. In --release mode, an average compaction takes 0.2-0.5 seconds.
  • Compatible with the original implementation. If it isn't (crash/read error/write error), it's a bug and needs to be fixed.
  • Performance is decent; while not quite up to par with the original (we don't use multithreading, for example) it is very much usable.
  • Safe: Many places use asserts though, so you may rarely see a crash -- in which case you should file a bug.

Goals

Some of the goals of this implementation are

  • As few copies of data as possible; most of the time, slices of bytes (&[u8]) are used. Owned memory is represented as Vec<u8> (and then possibly borrowed as slice). Zero-copy is not always possible, though, and sometimes simplicity is favored.
  • Correctness -- self-checking implementation, good test coverage, etc. Just like the original implementation.
  • Clarity; commented code, clear structure (hopefully doing a better job than the original implementation).
  • Coming close-ish to the original implementation; clarifying the translation of typical C++ constructs to Rust.

leveldb-rs's People

Contributors

dermesser avatar jxs avatar vi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.