An implementation of RDF.JS Dataset and Store that partly resorts to Web Assembly.
Check wasm-tree-frontend/README.md for proper documentation about "how to use?"
This repository is :
-
A BTreeDataset written in Rust that uses numbers (the backend)
-
A Javascript Wrapper class that is RDF/JS compliant (the frontend)
- Users are invited to the read the wasm-tree-frontend documentation.
- Run
./mocha
(npm install mocha -g
if needed) in wasm-tree-frontend.
Tests are only done in Javascript from the front end. To test frontend modification you need to:
- Modify
wasm-tree-frontend
dependencies to use the localwasm-tree-backend
:- in
package.json
use this dependency"@bruju/wasm-tree-backend": "../wasm-tree-backend/pkg",
in place of the current one.
- in
- Build the backend
cd wasm-tree-backend
./buildpkg.py
- Go in the frontend
cd ../wasm-tree-frontend
npm install
mocha
Rust and wasm-pack are needed.
Compile and package the frontend:
cd wasm-tree-backend/
./buildpkg.py
cd pkg
wasm-pack pack
cd ../../
Package the backend:
cd wasm-tree-frontend
npm pack
The presented bench have been run on my computer (Dell Inspiron 15 5000 with a Intel(R) Core(TM) i5-1035G1 CPU), on nodejs / native rust.
For the tested .match
function calls, we are always faster than Graphy and sophia_wasm and we are sometimes faster than Sophia itself.
The benchmark infrastructure can be found here
MIT License