@lbug/lbug-wasm
v0.12.2
Published
Ladybug GraphDB powered by WebAssembly
Maintainers
Readme
This project has been archived because it is no longer maintained. The latest official version can be found at Ladybug WASM Page (Ladybug Team)
Ladybug is an embedded graph database built for query speed and scalability.
Ladybug-Wasm brings Ladybug to every browser thanks to WebAssembly.
Try it out at Ladybug-shell.netlify.app.
Installation
Prerequisite: Enable Cross-Origin-isolation
CDN
<script type="module">
import Ladybug_wasm from 'https://unpkg.com/@Ladybug/Ladybug-wasm@latest/dist/Ladybug-browser.js';
(async () => {
const Ladybug = await Ladybug_wasm();
window.Ladybug = Ladybug
const db = await Ladybug.Database()
const conn = await Ladybug.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 @Ladybug/Ladybug-wasmimport Ladybug_wasm from '@Ladybug/Ladybug-wasm';
(async () => {
const Ladybug = await Ladybug_wasm();
const db = await Ladybug.Database()
const conn = await Ladybug.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/Ladybug-wasm.git --recursive
make packageRepository Structure
| Subproject | Description | Language | | -------------------------------------------------------- | :------------- | :--------- | | Ladybug_wasm | Wasm Library | C++ | | @Ladybug/Ladybug-wasm | Javascript API | Javascript | | @Ladybug/Ladybug-shell | Cypher Shell | React |
License
By contributing to Ladybug-wasm, you agree that your contributions will be licensed under the MIT License.
