You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix Python Docker builder and reorganize README build sections
- Fixed Python Docker builder to use flexible filename matching local method
- Changed from hardcoded ${APP_TYPE}.py to ${APP_NAME}.py pattern
- Both Docker and local builds now expect same naming convention
- Reorganized README to present local builds first, then Docker builds
- Added clear guidance on when to use each build approach
- Removed 'Recommended' labels for neutral presentation
- Made both Rust and Python sections consistent in structure
For comprehensive documentation of the WASM Rust SDK including APIs for state store, metrics, and logging, see the [WASM Rust SDK Reference](#wasm-rust-sdk-reference).
112
128
113
129
### Create your operator project
@@ -124,6 +140,7 @@ version = "0.1.0"
124
140
edition = "2021"
125
141
126
142
[dependencies]
143
+
wit-bindgen = "0.22"
127
144
tinykube_wasm_sdk = { version = "0.2.0", registry = "azure-vscode-tinykube" }
128
145
serde = { version = "1", default-features = false, features = ["derive"] }
129
146
serde_json = { version = "1", default-features = false, features = ["alloc"] }
Build directly on your development machine using the Rust toolchain:
204
+
205
+
**Prerequisites**: Ensure you have configured the Azure IoT Operations registry environment variables (see [Configure Azure IoT Operations Registry](#configure-azure-iot-operations-registry) above) before building locally.
The wit-bindgen dependency will automatically generate the required type bindings during build.
191
217
192
-
For simplified development without local toolchain setup, use the streamlined Docker builder:
218
+
**Use local builds when you:**
219
+
- Want fastest iteration during development
220
+
- Need full control over the build environment
221
+
- Are debugging build issues or dependencies
222
+
- Prefer working with familiar Rust tooling
223
+
224
+
#### Docker Build
225
+
226
+
Build using a containerized environment with all dependencies pre-installed:
193
227
194
228
```bash
195
229
# Build release version (default)
@@ -201,6 +235,12 @@ docker run --rm -v "$(pwd):/workspace" ghcr.io/azure-samples/explore-iot-operati
201
235
202
236
Output will be placed in `bin/<ARCH>/<BUILD_MODE>/temperature-converter.wasm`. For complete Docker builder documentation, see the [Rust README](rust/README.md).
203
237
238
+
**Use Docker builds when you:**
239
+
- Want consistent builds across different development environments
240
+
- Don't want to install and configure the Rust toolchain locally
Output will be placed in `bin/<ARCH>/<BUILD_MODE>/temperature-converter.wasm`. For complete Docker builder documentation, see the [Python README](python/README.md).
340
+
Output will be placed in `bin/<ARCH>/<BUILD_MODE>/temperature_converter.wasm`. The Docker builder expects your Python file to be named `${APP_NAME}.py` (e.g., `temperature_converter.py` for `--app-name temperature_converter`), matching the local development pattern.
341
+
342
+
For complete Docker builder documentation, see the [Python README](python/README.md).
343
+
344
+
**Use Docker builds when you:**
345
+
- Want consistent builds across different development environments
346
+
- Don't want to install componentize-py and its dependencies locally
347
+
- Need automatic schema path resolution
348
+
- Are building in CI/CD pipelines or want reproducible builds
0 commit comments