Skip to content

Commit 840e441

Browse files
committed
Align with Azure Samples dataflow graphs patterns (Marcel feedback)
- Add [build] target in .cargo/config.toml (avoids --target flag on every build) - Add configuration key-value pairs to DataflowGraph YAML showing how runtime config reaches modules (temperature_lower_bound/upper_bound) - Link to azure-edge-extensions-aio-dataflow-graphs samples repo - Patterns verified against Marcel Bindseil's ISE samples Signed-off-by: John Lian <[email protected]>
1 parent d44d98a commit 840e441

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

articles/iot-operations/develop-edge-apps/howto-develop-wasm-modules.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,14 @@ Create `.cargo/config.toml` to configure the SDK registry:
7373
```toml
7474
[registries]
7575
aio-wg = { index = "sparse+https://pkgs.dev.azure.com/azure-iot-sdks/iot-operations/_packaging/preview/Cargo/index/" }
76+
77+
[build]
78+
target = "wasm32-wasip2"
7679
```
7780

81+
> [!TIP]
82+
> Adding `[build] target = "wasm32-wasip2"` to your `.cargo/config.toml` means you don't need to pass `--target wasm32-wasip2` on every `cargo build` command. The [Azure Samples dataflow graphs repository](https://github.com/Azure-Samples/azure-edge-extensions-aio-dataflow-graphs) uses this pattern.
83+
7884
Edit `Cargo.toml`:
7985

8086
```toml
@@ -298,6 +304,11 @@ spec:
298304
graphSettings:
299305
registryEndpointRef: my-registry-endpoint
300306
artifact: graph-simple:1.0.0
307+
configuration:
308+
- key: temperature_lower_bound
309+
value: "-40"
310+
- key: temperature_upper_bound
311+
value: "3422"
301312
- nodeType: Destination
302313
name: mqtt-destination
303314
destinationSettings:
@@ -1019,3 +1030,4 @@ For integration testing, deploy your module to a development cluster and use MQT
10191030
- [Build WASM modules with VS Code extension](howto-build-wasm-modules-vscode.md) for IDE-based development
10201031
- [Run ONNX inference in WASM](./howto-wasm-onnx-inference.md) for ML model integration
10211032
- [Azure IoT Operations WASM samples](https://github.com/Azure-Samples/explore-iot-operations/tree/main/samples/wasm) on GitHub
1033+
- [Data flow graph samples with schema validation and WIT composition](https://github.com/Azure-Samples/azure-edge-extensions-aio-dataflow-graphs) on GitHub

0 commit comments

Comments
 (0)