Skip to content

Installation

bash
pnpm add @actor-web/runtime
# optional: state-machine test helpers
pnpm add -D @actor-web/testing

Actor-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:

ImportUse for
@actor-web/runtimeCore: defineBehavior, messages, local runtime.
@actor-web/runtime/topologydefineActorWebTopology and the DSL.
@actor-web/runtime/browserBrowser-safe sources & clients.
@actor-web/runtime/nodeserveNode, HTTP ingress — server only.
@actor-web/testingXState machine analysis helpers.

See the API entry-point map for what each exports.

Next