Installation
bash
pnpm add @actor-web/runtime
# optional: state-machine test helpers
pnpm add -D @actor-web/testingActor-Web targets modern browsers and Node. Messages and events must be JSON-serializable, since they may cross a worker or network boundary.
Entry points
Import from the narrowest entry point that fits — browser bundles should not pull in Node built-ins:
| Import | Use for |
|---|---|
@actor-web/runtime | Core: defineBehavior, messages, local runtime. |
@actor-web/runtime/topology | defineActorWebTopology and the DSL. |
@actor-web/runtime/browser | Browser-safe sources & clients. |
@actor-web/runtime/node | serveNode, HTTP ingress — server only. |
@actor-web/testing | XState machine analysis helpers. |
See the API entry-point map for what each exports.
Next
- Your first actor — build a counter.
- Topology & local runtime — wire it up and run it.