0.7.0 • Published 1 year ago

@kuzu/kuzu-wasm v0.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

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.

Installation

Prerequisite: Enable Cross-Origin-isolation

CDN

<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>

Webpack/React/Vue

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());
})();

Build from source

git clone https://github.com/unswdb/kuzu-wasm.git --recursive
make package

Repository Structure

SubprojectDescriptionLanguage
kuzu_wasmWasm LibraryC++
@kuzu/kuzu-wasmJavascript APIJavascript
@kuzu/kuzu-shellCypher ShellReact

License

By contributing to kuzu-wasm, you agree that your contributions will be licensed under the MIT License.

0.7.0

1 year ago

0.6.2-dev

1 year ago

0.6.1-dev

1 year ago

0.6.0

1 year ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago