edge-toolkit is a WebSocket-based edge-computing framework that runs AI on hardware you control, so nothing has to leave your network. A lightweight server acts as a hub that serves small AI modules — written in Rust, Python, Dart, C#, Java and more, each compiled to WebAssembly or transpiled to JavaScript — straight to a browser, where they run locally and can reach the browser's own Web APIs (camera, microphone, geolocation, motion sensors, Bluetooth, NFC) to sense the real world directly. The same framework also drives larger models on local GPU hardware through standardised WebAssembly interfaces, so one toolkit spans on-device and server inference without changing the protocol.
The result is AI that protects privacy and data sovereignty: sensitive camera, audio and research data stay on the device or your own network, never sent to an external cloud service.
Please install mise, including the shell integration.
It is needed for all use of this repository.
The mise configuration lives under .mise/: the always-loaded
.mise/config.toml holds the Rust/Node tooling and shared
tasks, and per-language .mise/config.<lang>.toml files (dart, dotnet, java,
python, zig) are selected via MISE_ENV so a dev can work on one language
without installing the others — e.g. MISE_ENV=dart mise install. CI runs
every language; mise run check-all (and install-all, test-all, …) act on
all of them at once.
The following works for Linux, macOS and Windows, and all tools "installed" are only installed into the local workspace, so no need for admin/root privileges.
Configure it with:
mise settings experimental=true
mise settings set cargo.binstall truePre-install cargo-install, which can be done using:
mise use -g cargo-binstallOn Windows only, pipx also needs to be pre-installed.
See the Windows section of pipx instructions.
On MacOS, the Xcode Command Line Tools (clang, git, make, etc.) must be
installed first:
xcode-select --installWe also need to install a better linker into the workspace.
mise install conda:lldBefore installing dependencies, please the install openssl development files separately:
mise install conda:opensslThen install the remaining dependencies:
mise install-allUse mise run fmt-all and mise run check-all to run formatters and checkers.
In a separate terminal start OpenObserve (o2) and leave it running.
mise run o2Then start the fetch the ONNX models and run the server
mise run download-models
mise run build-modules-all
mise run ws-serverScan the QR-Code with a smart-phone camera and open the URL.
Select the module to run in the drop-down, then click "Run module" button.
Note: The WASM build disables WebAssembly reference types, so it can still load on older browsers such as Chrome 95.
In a separate terminal, open the OpenObserve UX using:
mise run open-o2The server logs appear in the Logs section.
The module list is dynamically populated from the modules in services/ws-modules.
Each module must have a package.json that defines a main which contains a JavaScript file
that can load and run the module.
Under each module in ws-modules, the package can be found in a subdirectory pkg.
Most of the module are built from Rust using wasm-pack build --target web.
There are also modules written in:
- Dart
- Java
- .Net C#
- Python, using pyodide
- Zig, including C code.
The default UX in the web-browser is also a loadable module located in services/ws-server/static.
A custom UX module can be used by setting the ws-server environment variable MODULES_ROOT.
The WebSocket protocol and the ws-server REST surface are described by
machine-readable specs regenerated from their Rust sources of truth by
mise run gen-specs-all:
- WebSocket (AsyncAPI 3.0):
generated/specs/ws.yaml. Source:ClientMessage+ServerMessageinlibs/edge-toolkit/src/ws.rs. Generated clients:generated/dart-ws/,generated/python-ws/, and theet:ws-messagesWIT undergenerated/specs/wit/deps/. - REST (OpenAPI 3.0):
generated/specs/rest.yaml. Source:#[utoipa::path]annotations on the handlers inservices/{ws-server,modules,storage}. Typed Rust client atgenerated/rust-rest/(consumed byet-ws-wasi-runnerand the browserdata1module).
See generated/README.md for a full catalogue
of what's regenerated vs. hand-maintained under generated/.
Run the end-to-end tests using Chrome:
mise run ws-e2e-chromeRun an example demo scenario using et-cli
cargo install --path utilities/cli --force
et-cli generate-deployment \
--input-file verification/local/input/facility-security-scenario.yaml \
--output-dir verification/local/output/facility-security-scenarioThis will generate a mise.toml file under
verification/local/output/facility-security-scenario. Run the following
command to start the demo scenario:
mise run generated-scenarioTo generate a Docker Compose deployment instead, pass
--output-type docker-compose or set deployment_type: docker-compose in the
scenario input YAML. This writes compose.yaml to the output directory:
et-cli generate-deployment \
--input-file verification/local/input/facility-security-scenario.yaml \
--output-dir verification/local/output/facility-security-scenario \
--output-type docker-compose
cd verification/local/output/facility-security-scenario
docker compose up --buildThe generated scenario config only selects which prebuilt modules ws-server
serves. Module builds are expected to be handled separately from the repository
root.
To regenerate all checked-in verification outputs from
verification/*/input, writing each scenario to
the matching verification/*/output/<input-file-stem> folder. This generates
all supported deployment files for each scenario, currently mise.toml and
compose.yaml:
mise run regen-verificationThis repository is part of a grant managed by the School of EECMS, Curtin University.
ABN 99 143 842 569.
CRICOS Provider Code 00301J.
TEQSA PRV12158