Commands
pulse validate
Validate a compiled artifact and its runtime contract without executing.
Usage
- Reads the artifact.
- Checks that the declared runtime contract is supported.
- Confirms the entrypoint resolves to a valid module-level function.
- Exits
0if the artifact is valid, non-zero otherwise.
pulse run
Run a compiled application artifact.
Usage
- Validate the artifact and runtime contract.
- Resolve the entrypoint from
[application].entry. - Invoke the entrypoint.
- 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;mainis a recommendation, not a hard requirement. - Entrypoints are not discovered from filenames, folders, or object constructors.
- When
Eis 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.
onStart, no onStop, no annotation-driven startup.
Runtime contract
Every application artifact declares a runtime contract inkairo.toml:
- 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
- Command-line arguments
- Environment variables
- Clocks, randomness
- Filesystem, network
- Signal handling
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
Resultfailures. - Pulse must not silently retry or restart faulted execution.
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.
Related
Pulse overview
Pulse in the toolchain.
Pulse.Console
The console runtime service.
