Skip to content

edge-toolkit/core

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

edge-toolkit core

mise

Please install mise, including the shell integration. It is needed for all use of this repository.

The mise configuration is stored in .mise.toml.

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 true

Pre-install cargo-install, which can be done using:

mise use -g cargo-binstall

Windows only

On Windows only, pipx also needs to be pre-installed. See the Windows section of pipx instructions.

MacOS only

On MacOS, we need to install a better linker into the workspace.

mise install conda:lld

All OS

Before installing dependencies, please the install openssl development files separately:

mise install conda:openssl

Then install the remaining dependencies:

mise install

Contributing

Use mise run fmt and mise run check to run formatters and checkers.

Run ws agent in browser

Build modules and run the WS server

In a separate terminal start OpenObserve (o2) and leave it running.

mise run o2

Then start the fetch the ONNX models and run the server

mise run download-models
mise run build-modules
mise run ws-server

Scan 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-o2

The server logs appear in the Logs section.

Modules

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.

Root module

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.

Protocol & API specs

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:

See generated/README.md for a full catalogue of what's regenerated vs. hand-maintained under generated/.

Run e2e

Run the end-to-end tests using Chrome:

mise run ws-e2e-chrome

Run 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-scenario

This 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-scenario

To 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 --build

The 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-verification

Grant

This 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

About

No description, website, or topics provided.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors