scadable compile
Run the full pipeline and produce gateway artifacts.
scadable compile
scadable compile --target linux --output dist
scadable compile --target esp32 # raises TargetNotImplementedError| Flag | Default | Notes |
|---|---|---|
--target <name> | linux | One of linux, esp32, rtos. ESP and RTOS are preview. |
--output <dir> | out | Where to write artifacts |
-v | false | Verbose: print each pipeline stage |
What it produces
Run with the default Linux target:
out/
├── drivers/
│ ├── line-sensor.yaml
│ └── env-sensor.yaml
├── manifest.json
└── bundle.tar.gzThree artifacts, each with a job:
drivers/<id>.yamlis the driver config the gateway reads to spawn a Modbus subprocess. One file per device. The gateway watches/etc/scadable/devices/<id>/config.yamland reloads when this file changes.manifest.jsonis the project manifest. Project name, version, target, full device + controller + model inventory. The dashboard reads this to display what is deployed.bundle.tar.gzis everything together (drivers, manifest, models). Ship this single file to the gateway.
Verifying the output
Inspect the bundle without unpacking it:
tar -tzf out/bundle.tar.gzRead a driver config:
cat out/drivers/line-sensor.yamlRead the manifest:
jq . out/manifest.jsonTargets
scadable compile --target linux works today. --target esp32 and --target rtos raise TargetNotImplementedError with the planned release version. The DSL still validates against these targets, so you can author forward-compatible projects:
scadable verify --target esp32 # full capability check
scadable compile --target esp32 # raises TargetNotImplementedErrorExit codes
| Code | Meaning |
|---|---|
| 0 | Build succeeded |
| 1 | Validation errors (run scadable verify for details) |
| 2 | Emit failure (disk full, permissions, etc.) |
In CI
scadable verify --target linux && \
scadable compile --target linux --output distThe two commands are idempotent. Compile re-runs verify internally; verify-then-compile gives you a cleaner failure mode if validation breaks.
Next steps
- Deploying to a Gateway: copy the bundle and restart
- Error Catalog: every error and its fix
Updated 4 days ago
