Standalone Runtime Primitives
nexus-runtime can be used without ActorSystem when you only need async
composition, scheduling, and timeout/cancellation primitives.
When This Is Useful
- building framework adapters around callback/timer APIs
- orchestrating background workflows without actor hierarchy
- sharing
Duration+Futureabstractions across packages - writing deterministic tests with
StepRuntimeandVirtualClock
Install
# Runtime contracts + Future primitives
composer require nexus-actors/runtime
# Optional deterministic runtime implementation for tests
composer require --dev nexus-actors/runtime-step
Practical Example (No Actors)
Use the full standalone examples here: Runtime Without Actors.
That page covers:
- deterministic one-shot orchestration with
StepRuntime - timeout/failure mapping via
FutureTimeoutException - migration guidance for adopting
nexus-corelater
Runtime Contract
Concrete runtime packages (runtime-fiber, runtime-swoole, runtime-step)
implement Monadial\Nexus\Runtime\Runtime\Runtime.
Use this when your code should accept runtime implementations without coupling to actor APIs.