wasm_redb
View Sourceredb 5.0.0, the embedded transactional key-value store, running inside a
WebAssembly guest on erlang_wasm, with no NIF. Named tables of binary keys
and values in key order, atomic transactions across tables, snapshot reads,
range scans. The guest is prebuilt in priv/wasm_redb.wasm; priv/BUILD-INFO
says what it was built from.
{ok, Db} = wasm_redb:open(#{storage => {wasm_storage_file, "data.redb"}}),
ok = wasm_redb:put(Db, <<"docs">>, <<"key">>, <<"value">>),
{ok, <<"value">>} = wasm_redb:get(Db, <<"docs">>, <<"key">>).It is much slower than native redb. Before you depend on it, read the redb guide, what an error means and the project's status.