What Pulse does
When you invokepulse run, Pulse performs the following steps in order:
1
Load artifacts
Pulse reads the Forge-built artifacts from the package’s
build/ directory.2
Validate runtime metadata
Pulse checks that all required metadata is present, that artifact versions
are consistent, and that the declared runtime contract is compatible with
this version of Pulse.
3
Resolve the entrypoint
Pulse locates the function named by the
entry field in [application]
within the loaded artifact.4
Create the root execution boundary
Pulse establishes the root boundary that scopes the lifetime of the
running application.
5
Invoke the entrypoint
Pulse calls the entrypoint function to start the application.
6
Run the async scheduler
Pulse drives the async scheduler for the lifetime of the application,
dispatching tasks as they become ready.
7
Handle I/O and faults
Pulse exposes
Pulse.Console.out and Pulse.Console.error for standard
output and error output. Root faults (unhandled errors at the boundary)
propagate to process termination.8
Map completion to exit behavior
When the entrypoint returns (or a root fault occurs), Pulse maps the
outcome to an exit code and performs a clean runtime shutdown.
Commands
pulse validate
kairo.toml is compatible. Use this to confirm a build is runnable before deploying it.
pulse run
pulse validate) before executing. If validation fails, Pulse exits with code 3 and reports the problem without starting the application.
Pulse must be invoked from the package root (the directory containing
kairo.toml and build/). It reads the manifest to locate the entry
field and the build/ directory for artifacts.Entrypoint signatures
The function named by the[application].entry field in your manifest must match one of the following signatures. Pulse accepts all of them:
Exit codes
Pulse maps every possible application outcome to a well-defined process exit code:What Pulse does not do
Pulse is a runtime only. It has a narrow, well-defined scope:- Pulse does not compile source code. Run
forge buildto produce artifacts first. - Pulse does not resolve or restore packages. Run
forge restoreto updateforge.lock. - Pulse does not accept source
.akfiles directly. It only loads Forge-built artifacts frombuild/. - Pulse rejects incomplete or incompatible artifacts. If metadata is missing or the runtime contract version does not match, Pulse exits with code
3and reports aPLS-prefixed diagnostic.
Diagnostic codes
Pulse emits diagnostics with thePLS prefix when it encounters problems with artifacts or runtime configuration:
Next steps
Forge
Build your application artifacts with Forge before running them with Pulse.
Manifest
Configure your entrypoint and runtime contract in
kairo.toml.