Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ravener/luvel
A LevelDB wrapper for LuaJIT and Luvit
https://github.com/ravener/luvel
database ffi ffi-bindings ffi-wrapper key-value leveldb lua luajit luajit-bindings luajit-ffi luajit-ffi-bindings luvit
Last synced: 3 months ago
JSON representation
A LevelDB wrapper for LuaJIT and Luvit
- Host: GitHub
- URL: https://github.com/ravener/luvel
- Owner: ravener
- License: mit
- Created: 2022-11-03T06:45:11.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-20T14:40:04.000Z (11 months ago)
- Last Synced: 2024-07-29T19:13:14.121Z (5 months ago)
- Topics: database, ffi, ffi-bindings, ffi-wrapper, key-value, leveldb, lua, luajit, luajit-bindings, luajit-ffi, luajit-ffi-bindings, luvit
- Language: Lua
- Homepage: https://ravener.github.io/luvel
- Size: 24.4 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Luvel
`luvel` is a LuaJIT FFI wrapper for [leveldb](https://github.com/google/leveldb)## Install
luvel only runs on LuaJIT and Luvit.If you are using LuaJIT just copy the `luvel.lua` file into your project.
If you are using luvit then you may install the lit package:
```sh
$ lit install ravener/luvel
```## Usage
```lua
local luvel = require("luvel")
local db = luvel.open("database", { createIfMissing = true })-- Putting keys
db:put("key", "value")
db:put("another", "two")-- Getting keys
print(db:get("key"))-- Iterators
for k, v in pairs(db) do
print(k, v)
end-- Close the database.
db:close()
```See also the full [documentation](https://ravener.github.io/luvel)
## TODO
The library is usable, although I'm still cleaning it up and things are bound to change a lot.Here's a list of things left to do:
- Snapshots support
- Support more options
- More documentation
- TestsAnd more, expect it to be stable after a `1.0.0` release. In the meantime sending feedback regarding the design will help a lot.
## License
Released under [MIT License](LICENSE)The initial code started as a modification of [Codezerker/lua_leveldb](https://github.com/Codezerker/lua_leveldb) but has since evolved into a much higher level wrapper.