Skip to main content
Pulse is the Kairo runtime. It loads compiled application artifacts, validates them, and runs them. Pulse also exposes the small set of runtime services that Kairo applications call explicitly, starting with the console.

What Pulse does

Load

Read a compiled application artifact produced by Forge.

Validate

Confirm runtime contract compatibility before executing any code.

Resolve entrypoint

Find the module-level function named in [application].entry.

Execute

Run the entrypoint, provide async machinery, and terminate with an exit code.

Startup lifecycle

1

Validate artifact and runtime contract

Pulse checks the artifact’s declared runtime contract against its own supported versions. Incompatible artifacts are rejected before any application code runs.
2

Resolve the entrypoint

Pulse reads [application].entry and locates the corresponding public module-level function.
3

Invoke the entrypoint

Execution begins at that function. There are no implicit lifecycle hooks or hidden object constructions.
4

Terminate

When the entrypoint completes or an uncaught root fault occurs, Pulse terminates the process with an exit code.

Entrypoint signatures

Pulse accepts these entrypoint signatures in v0.1:
  • public func main()
  • public func main(): Int32
  • public func main(): Result<Int32, E>
  • public async func main()
  • public async func main(): Int32
  • public async func main(): Result<Int32, E>
The name does not have to be main, but main is the recommended convention.

Exit codes

Result.success(17) is a successful result state that still exits with code 17. Result.failure(...) is a distinct application-failure outcome.

Runtime services

Pulse exposes host services explicitly. They must be imported and called by name; there are no ambient globals. V0.1 guaranteed services:
  • Standard output: Pulse.Console.out.write, Pulse.Console.out.writeLine
  • Standard error: Pulse.Console.error.write, Pulse.Console.error.writeLine
  • Async execution machinery (async/await runtime; execution semantics deferred)
  • Process exit and termination handling

Runtime contract versioning

Every Forge-built application artifact declares a Pulse runtime contract version in kairo.toml:
Pulse implementations advertise which contract versions they support. Incompatible artifacts are rejected before any application code runs.

Faults at the root boundary

If an uncaught fault reaches the application root, Pulse:
  1. Terminates the process with a non-zero exit code.
  2. May emit a diagnostic to standard error.
  3. Never silently converts the fault into success or a Result failure.
  4. Never retries or restarts execution.
See Error Handling for the difference between Result failures and faults.

Relationship to Forge

  • Forge builds compiled artifacts from source.
  • Pulse runs those artifacts.
  • Kairo owns language meaning. Pulse owns execution.

Next steps

Pulse Runtime reference

pulse validate, pulse run, and diagnostic codes.

Pulse.Console

The console runtime service in detail.