This library provides Haskell bindings to LevelDB

Build Status



Note: as of version 1.3, LevelDB can be built as a shared library. Thus, as of version 0.1.0 of this library, LevelDB is no longer bundled and must be installed on the target system.

To install the latest version from hackage:

$ cabal install leveldb-haskell

To install from checked-out source:

$ cabal install


This library is in very early stage and has seen very limited testing. Comments and contributions are welcome.

Bugs and Contributing

Please report issues via Patches are best submitted as pull requests, or via email (


BSD 3, see LICENSE file.



* Relaxed constraints in `MonadResource` module


* Expose `compactRange`


* Slices include the end element (justifies version bump)
* Large parts of the Data.API implemented. This is now completely overdone


* Remove `close` from public API


* Deprecate `close`


* New streaming interface (experimental)


* Deprecate `mapIter`, `iterItems`, `iterKeys`, `iterValues`


* ResourceT is no longer compulsory


* requires LevelDB v1.7
* support for filter policy (LevelDB v1.5), either custom or using the built-in
bloom filter implementation
* write batch values no longer require a `memcpy` to be early-finalizer-safe
(introduced in 0.1.1)


* memory (foreign pointers) is managed through
[ResourceT]( Note that this
requires to lift monadic actions inside the `MonadResource` monad, see the
* links against shared library (LevelDB v1.3 or higher)
* LevelDB 1.3 API fully supported (including custom comparators, excluding
custom environments)


* experimental releases
comments powered byDisqus