Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .mise.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dprint-fmt = "dprint fmt"
editorconfig-check = "ec"

[tasks.fmt]
depends = ["cargo-fmt", "dprint-fmt", "taplo-fmt"]
depends = ["cargo-clippy-fix", "cargo-fmt", "dprint-fmt", "taplo-fmt"]
description = "Run repository formatters"

[tasks.install-nightly]
Expand Down Expand Up @@ -55,6 +55,9 @@ run = "cargo +nightly fmt -- --check"
[tasks.cargo-clippy]
run = "cargo clippy --workspace"

[tasks.cargo-clippy-fix]
run = "cargo clippy --fix --allow-dirty --allow-staged --workspace"

[tasks.taplo-fmt]
run = "taplo format"

Expand Down Expand Up @@ -82,6 +85,15 @@ run = "wasm-pack build . --target web -- -Z build-std=std,panic_abort"
RUSTFLAGS = "-C target-cpu=mvp -C target-feature=+mutable-globals,+sign-ext,+nontrapping-fptoint"
RUSTUP_TOOLCHAIN = "nightly"

[tasks.build-ws-har1-module]
description = "Build the har1 workflow WASM module"
dir = "services/ws-modules/har1"
run = "wasm-pack build . --target web"

[tasks.build]
depends = ["build-ws-har1-module", "build-ws-wasm-agent"]
description = "Build all WebAssembly modules"

[tasks.test-ws-wasm-agent-firefox]
description = "Run headless Firefox tests for the WebSocket WASM client"
dir = "services/ws-wasm-agent"
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = ["libs/edge-toolkit", "services/ws-server", "services/ws-wasm-agent"]
members = ["libs/edge-toolkit", "services/ws-modules/har1", "services/ws-server", "services/ws-wasm-agent"]
resolver = "2"

[workspace.dependencies]
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Download the onnx from https://huggingface.co/amd/retinaface and save it in

```bash
mise run build-ws-wasm-agent
mise run build-ws-har1-module
mise run ws-server
```

Expand All @@ -43,7 +44,8 @@ which will normally be something like 192.168.1.x.

Then on your phone, open Chrome and type in https://192.168.1.x:8433/

Click "Load HAR model" and then "Start sensors".
Click "har demo".

For webcam inference, click "Load video CV model" and then "Start video".

## Grant
Expand Down
39 changes: 39 additions & 0 deletions services/ws-modules/har1/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
[package]
name = "et-ws-har1"
version = "0.1.0"
edition = "2024"

[lib]
crate-type = ["cdylib", "rlib"]

[dependencies]
et-ws-wasm-agent = { path = "../../ws-wasm-agent" }
js-sys = "0.3"
serde.workspace = true
serde_json.workspace = true
tracing.workspace = true
tracing-wasm = "0.2"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4"
web-sys = { version = "0.3", features = [
"AddEventListenerOptions",
"BinaryType",
"Document",
"DomError",
"Event",
"EventTarget",
"HtmlCanvasElement",
"MediaDevices",
"MediaStream",
"MediaStreamConstraints",
"MediaStreamTrack",
"MessageEvent",
"Navigator",
"Storage",
"WebSocket",
"Window",
"console",
] }

[dev-dependencies]
wasm-bindgen-test = "0.3"
Loading
Loading