JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15
  • Score
    100M100P100Q79899F
  • License MIT

Kuzu powered by WebAssembly

Package Exports

  • @kuzu/kuzu-wasm
  • @kuzu/kuzu-wasm/dist/kuzu.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kuzu/kuzu-wasm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Kùzu-Wasm

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

Subproject Description Language
kuzu_wasm Wasm Library C++
@kuzu/kuzu-wasm Javascript API Javascript
@kuzu/kuzu-shell Cypher Shell React

License

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