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(): Int32public func main(): Result<Int32, E>public async func main()public async func main(): Int32public async func main(): Result<Int32, E>
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/awaitruntime; execution semantics deferred) - Process exit and termination handling
Runtime contract versioning
Every Forge-built application artifact declares a Pulse runtime contract version inkairo.toml:
Faults at the root boundary
If an uncaught fault reaches the application root, Pulse:- Terminates the process with a non-zero exit code.
- May emit a diagnostic to standard error.
- Never silently converts the fault into success or a
Resultfailure. - Never retries or restarts execution.
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.
