Kùzu is an embedded graph database built for query speed and scalability.
Kùzu-Wasm brings kuzu to every browser thanks to WebAssembly.
Try it out at kuzu-shell.netlify.app.
Prerequisite: Enable Cross-Origin-isolation
<script type="module">
import kuzu_wasm from 'https://unpkg.com/@kuzu/kuzu-wasm@latest/dist/kuzu-browser.js';
(async () => {
const kuzu = await kuzu_wasm();
window.kuzu = kuzu
const db = await kuzu.Database()
const conn = await kuzu.Connection(db)
await conn.execute(`CREATE NODE TABLE User(name STRING, age INT64, PRIMARY KEY (name))`)
await conn.execute(`CREATE (u:User {name: 'Alice', age: 35});`)
const res = await conn.execute(`MATCH (a:User) RETURN a.*;`)
const res_json = JSON.parse(res.table.toString());
})();
</script>
npm install @kuzu/kuzu-wasm
import kuzu_wasm from '@kuzu/kuzu-wasm';
(async () => {
const kuzu = await kuzu_wasm();
const db = await kuzu.Database()
const conn = await kuzu.Connection(db)
await conn.execute(`CREATE NODE TABLE User(name STRING, age INT64, PRIMARY KEY (name))`)
await conn.execute(`CREATE (u:User {name: 'Alice', age: 35});`)
const res = await conn.execute(`MATCH (a:User) RETURN a.*;`)
const res_json = JSON.parse(res.table.toString());
})();
git clone https://github.com/unswdb/kuzu-wasm.git --recursive
make package
Subproject | Description | Language |
---|---|---|
kuzu_wasm | Wasm Library | C++ |
@kuzu/kuzu-wasm | Javascript API | Javascript |
@kuzu/kuzu-shell | Cypher Shell | React |
By contributing to kuzu-wasm, you agree that your contributions will be licensed under the MIT License.