Skip to main content
Reference for the Pulse runtime: commands, entrypoint signatures, exit codes, and the runtime contract model.

Commands

pulse validate

Validate a compiled artifact and its runtime contract without executing. Usage
Behavior
  • Reads the artifact.
  • Checks that the declared runtime contract is supported.
  • Confirms the entrypoint resolves to a valid module-level function.
  • Exits 0 if the artifact is valid, non-zero otherwise.

pulse run

Run a compiled application artifact. Usage
Behavior
  1. Validate the artifact and runtime contract.
  2. Resolve the entrypoint from [application].entry.
  3. Invoke the entrypoint.
  4. Terminate the process with an exit code derived from the entrypoint result or from a root-level fault.

Entrypoint signatures

Pulse accepts these signatures in v0.1: Rules
  • The entrypoint must be public.
  • The name is determined by [application].entry; main is a recommendation, not a hard requirement.
  • Entrypoints are not discovered from filenames, folders, or object constructors.
  • When E is used, it must be value-like.

Exit codes

Stage 6 froze the meaning of successful 0 and non-zero failure categories, but a globally standardized numeric catalog for Pulse-generated codes is deferred. Applications should own the exit codes they return; Pulse owns the ones it generates.

Application lifecycle

1

Validate

Pulse validates the artifact and its runtime contract.
2

Resolve entrypoint

Pulse locates the declared module-level function.
3

Execute

Pulse begins execution at the entrypoint.
4

Complete

Execution ends when the entrypoint returns or an uncaught root fault occurs.
5

Terminate

Pulse terminates the process with an exit code.
No implicit lifecycle hooks exist in v0.1: no onStart, no onStop, no annotation-driven startup.

Runtime contract

Every application artifact declares a runtime contract in kairo.toml:
Rules
  • Pulse implementations advertise which contract versions they support.
  • Pulse must reject artifacts targeting unsupported contracts before executing application code.
  • Compatible Pulse implementations must preserve the source-visible behavior promised by the contract version.
  • Upgrading to a different runtime contract is an explicit compatibility decision.

Runtime services (v0.1)

Pulse guarantees these services under the v0.1 runtime contract:
  • Standard output stream: Pulse.Console.out
  • Standard error stream: Pulse.Console.error
  • Async execution machinery (language shape frozen; runtime execution semantics deferred)
  • Entrypoint invocation
  • Process exit and termination handling
Deferred:
  • Command-line arguments
  • Environment variables
  • Clocks, randomness
  • Filesystem, network
  • Signal handling
See Pulse.Console for the console surface.

Faults at the root boundary

  • An uncaught fault at the application root terminates the process with a non-zero exit code.
  • Pulse may emit a diagnostic to standard error.
  • Pulse must not silently convert faults into successful completions or Result failures.
  • Pulse must not silently retry or restart faulted execution.
See Error Handling for the Result vs. fault distinction.

Threading

  • Pulse may use host threads internally.
  • Thread identity, thread count, and continuation affinity are not part of portable Kairo source semantics in v0.1.
  • Kairo source must not assume one async function equals one host thread.

Pulse overview

Pulse in the toolchain.

Pulse.Console

The console runtime service.