tinyactors compile
Compile charts or a system manifest into an image.
Usage
tinyactors compile [options] INPUT...Compiles SCXML charts or one system manifest into a .tai image. The first chart is the image's default boot chart. Each static src is read relative to the file that names it, then in each -I directory. The answer lists the diagnostics and what the image holds. With -o -, the image goes to standard output and the answer to standard error.
Options
-W, --warnings-as-errorsRefuse a chart that compiles with a warning.-I, --include DIRSearchDIRfor a src that is not beside the file naming it, in the order given. Repeatable.-o, --output FILEWrite the image toFILE, or to standard output whenFILEis -.-e, --emit KINDWrite the image asKIND. Values: image (the image's bytes) or c (an 8-aligned C array). Default: image.-s, --symbol NAMEName the C arrayNAMEwith--emitc;NAMEis a C identifier. Default: tinyactors_image.
Configure output formats like -f json using the shared options on the command reference.
Examples
tinyactors compile order.scxml payment.scxml -o order.tai# Compile
- **Compiled**: yes
- **Output**: order.tai
- **Emit**: image
- **Bytes**: 3552
- **Hash**: b256b6cbfab69138
- **Charts**: 2
- **Boot actors**: 1
## Diagnostics
_none_Compile two charts into one image.
tinyactors compile system.xml -o system.tai# Compile
- **Compiled**: yes
- **Output**: system.tai
- **Emit**: image
- **Bytes**: 3568
- **Hash**: 1c8ca2cc7138f14e
- **Charts**: 2
- **Boot actors**: 1
## Diagnostics
_none_Compile a system manifest into an image.
tinyactors compile order.scxml --emit c --symbol order_image -o order_image.c# Compile
- **Compiled**: yes
- **Output**: order_image.c
- **Emit**: c
- **Bytes**: 2720
- **Hash**: 5e66ab57693504aa
- **Charts**: 1
- **Boot actors**: 1
## Diagnostics
_none_Write the image as a C array named order_image.
tinyactors compile order.scxml -o - | tinyactors inspect -# Inspect
- **From**: image
- **Bytes**: 2720
- **Format**: 1
- **Hash**: 5e66ab57693504aa
- **Charts**: 1
- **Boot actors**: 1
- **Event names**: 18
## Sections
| Section | Offset | Bytes | Records |
| --- | --- | --- | --- |
| strings | 272 | 748 | 748 |
| charts | 1024 | 96 | 1 |
| states | 1120 | 384 | 6 |
| transitions | 1504 | 256 | 8 |
| words | 1760 | 136 | 34 |
| code | 1896 | 108 | 27 |
| expressions | 2008 | 224 | 14 |
| captures | 2232 | 40 | 2 |
| sends | 2272 | 112 | 2 |
| invokes | 2384 | 0 | 0 |
| data | 2384 | 36 | 3 |
| eventNames | 2424 | 288 | 18 |
| bootActors | 2712 | 8 | 1 |
## Charts
| Index | Name | Source | Datamodel | Binding | States | Transitions | Data | Expressions | Sends | Invokes | Code words |
| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0 | order | order.scxml | ecmascript | early | 6 | 8 | 3 | 14 | 2 | 0 | 27 |
## Boot actors
| Name | Chart |
| --- | --- |
| order | order |
# Compile
- **Compiled**: yes
- **Output**: -
- **Emit**: image
- **Bytes**: 2720
- **Hash**: 5e66ab57693504aa
- **Charts**: 1
- **Boot actors**: 1
## Diagnostics
_none_Compile to standard output and inspect the image.
Exit status
1An input is refused: it does not compile, or it is of an unknown format.3An input cannot be read, the image cannot be written or memory runs out.
Related pages
tinyactors checkCheck that charts compile or that an image verifies.tinyactors lintFind what cannot work as written in charts.tinyactors fmtRewrite charts and system manifests in the canonical layout.