Skip to content

Syndica/lmdb-zig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and use LMDB in zig.

Build Dependencies

Zig 0.13

Usage

Supported use cases:

  • ⬇️ Build a LMDB static library using the zig build system.
  • ⬇️ Import LMDB in a zig project.

Build LMDB

Clone this repository, then run zig build.

You will find a statically linked lmdb archive in zig-out/lib/liblmdb.a.

You can use this with any language or build system.

Import LMDB in a Zig project

Fetch lmdb and save it to your build.zig.zon:

zig fetch --save=lmdb https://github.com/Syndica/lmdb-zig/archive/<COMMIT_HASH>.tar.gz

Add the import to a module:

const lmdb = b.dependency("lmdb", .{}).module("lmdb");
exe.root_module.addImport("lmdb", lmdb);

Import the lmdb module.

const lmdb = @import("lmdb");

Test / Example

For a unit test demonstrating basic usage of lmdb, see test.zig. Run the test with zig build test.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages