tinyactors compile

Compile charts or a system manifest into an image.

Usage

shell
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 DIRSearch DIR for a src that is not beside the file naming it, in the order given. Repeatable.
  • -o, --output FILEWrite the image to FILE, or to standard output when FILE is -.
  • -e, --emit KINDWrite the image as KIND. Values: image (the image's bytes) or c (an 8-aligned C array). Default: image.
  • -s, --symbol NAMEName the C array NAME with --emit c; NAME is a C identifier. Default: tinyactors_image.

Configure output formats like -f json using the shared options on the command reference.

Examples

shell
tinyactors compile order.scxml payment.scxml -o order.tai
output
# 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.

shell
tinyactors compile system.xml -o system.tai
output
# 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.

shell
tinyactors compile order.scxml --emit c --symbol order_image -o order_image.c
output
# 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.

shell
tinyactors compile order.scxml -o - | tinyactors inspect -
output
# 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