-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32d9660
commit 419ac5b
Showing
24 changed files
with
24,390 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
MIT License | ||
|
||
Copyright (c) 2024-2025 Dylan Shang. | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,40 @@ | ||
# kuzu-wasm | ||
<div align="center"> | ||
<img src="https://raw.githubusercontent.com/dylanshang/kuzu-wasm/main/logo/logo.png" height="100"> | ||
<h1>Kùzu-Wasm</h1> | ||
</div> | ||
|
||
Make sure you have installed: | ||
1. Python3 | ||
2. [Emscripten](https://emscripten.org/docs/getting_started/downloads.html) | ||
<div align="center"> | ||
<a href="https://www.npmjs.com/package/@kuzu/kuzu-wasm/v/latest"> | ||
<img src="https://img.shields.io/npm/v/@kuzu/kuzu-wasm?logo=npm" alt="kuzu-wasm package on NPM"> | ||
</a> | ||
<a href="https://github.com/dylanshang/kuzu-wasm/actions"> | ||
<img src="https://github.com/dylanshang/kuzu-wasm/actions/workflows/shell.yml/badge.svg?branch=main" alt="Github Actions Badge"> | ||
</a> | ||
<a href="https://discord.gg/VtX2gw9Rug" rel="nofollow"> | ||
<img src="https://camo.githubusercontent.com/4c014897742bfc8910e0e2eefaf357f8b6957dca8179a6c8106b5189041cd8b9/68747470733a2f2f696d672e736869656c64732e696f2f646973636f72642f313139363531303131363338383830363833373f6c6f676f3d646973636f7264" alt="discord" data-canonical-src="https://img.shields.io/discord/1196510116388806837?logo=discord" style="max-width: 100%;"></a> | ||
</div> | ||
<h1></h1> | ||
|
||
## Download kuzu | ||
So far, `v0.4.2` is the latest release version of kuzu. | ||
For development consistency, I recommend that everyone use the same version | ||
``` | ||
cd kuzu-wasm | ||
git submodule update --init | ||
``` | ||
Or you can download recursively | ||
``` | ||
git clone git@github.com:DylanShang/kuzu-wasm.git --recursive | ||
``` | ||
[Kùzu](https://github.com/kuzudb/kuzu) is an embedded graph database built for query speed and scalability. | ||
|
||
## Build command | ||
``` | ||
chmod 755 build.sh | ||
./build.sh | ||
``` | ||
## Run command | ||
``` | ||
chmod 755 run.sh | ||
./run.sh | ||
``` | ||
## Update kuzu | ||
``` | ||
git submodule update --remote | ||
``` | ||
Kùzu-Wasm brings kuzu to every browser thanks to WebAssembly. | ||
|
||
## Simple test | ||
``` | ||
var database = new Module.WebDatabase("test",0,4,false,false,4194304*16) | ||
var connection = new Module.WebConnection(database,0) | ||
var r = connection.query("CREATE NODE TABLE User(name STRING, age INT64, PRIMARY KEY (name))") | ||
r.toString() | ||
r.isSuccess() | ||
var r2 = connection.query('COPY User From "kuzu/dataset/demo-db/csv/user.csv"') | ||
|
||
Try it out at [kuzu-shell.netlify.app](https://kuzu-shell.netlify.app), and chat with us on [Discord](https://discord.com/invite/VtX2gw9Rug). | ||
|
||
## Build from source | ||
```shell | ||
git clone https://github.com/DylanShang/kuzu-wasm.git --recursive | ||
make wasm_dev | ||
``` | ||
|
||
## Repository Structure | ||
|
||
| Subproject | Description | Language | | ||
| -------------------------------------------------------- | :------------- | :--------- | | ||
| [kuzu_wasm](/lib) | Wasm Library | C++ | | ||
| [@kuzu/kuzu-wasm](/packages/kuzu-wasm) | Javascript API | Javascript | | ||
| [@kuzu/kuzu-shell](/packages/kuzu-shell) | Cypher Shell | React | | ||
|
||
## Debug | ||
I debug using Chrome DevTools as described in this [blog post](https://developer.chrome.com/blog/wasm-debugging-2020/), which takes a few steps to set up. The first is to install the [C/C++ DevTools Support Extension](https://chrome.google.com/webstore/detail/cc%20%20-devtools-support-dwa/pdcpmagijalfljmkmjngeonclgbbannb) and to enable **WebAssembly Debugging: Enable DWARF support** in the DevTools settings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.