Skip to main content
Kairo’s standard library is deliberately layered. Each layer has a clear job, and you opt in to more capability by adding an explicit dependency. Nothing gets injected invisibly.

The three layers

Kairo Core

The language prelude. Available in every file with no import.

Pulse Runtime

Runtime services exposed by the Pulse engine. Explicit imports.

Astra Packages

Optional first-party packages for HTTP, JSON, data access, and more.

Layer 1: Kairo Core

The Core prelude is part of the language itself. You never import it. It provides the small set of types and utilities that most programs need. Included in Core: Core is the same on every supported platform. It never depends on host services.

Layer 2: Pulse Runtime

Pulse provides runtime services that are inherently host-dependent, like stdout and stderr. Each service is a module you import explicitly. Currently available:
  • Pulse.Console — standard output and standard error streams
Pulse runtime services are guaranteed by the Pulse runtime contract declared in kairo.toml. See Pulse Runtime for the contract model.
Deferred Pulse services (not part of v0.1):
  • Command-line arguments
  • Environment variables
  • Clocks, randomness
  • Filesystem, network
  • Signal handling

Layer 3: Astra first-party packages

Astra packages are optional, first-party packages published alongside Kairo. Add them to [dependencies] in kairo.toml to use them. Planned Astra packages include:

Astra.Net.Http

HTTP client and server primitives.

Astra.Data

Data access abstractions.

Astra.Json

JSON encoding and decoding.

Astra.Crypto

Hashing and cryptographic primitives.
Astra packages follow the same rules as any Kairo package: explicit dependencies, versioned, and reproducible through forge.lock.

Design principle: no ambient magic

Every capability beyond Core requires an explicit import or dependency. There is no stdlib grab bag, no ambient globals, and no hidden features that appear only in certain hosts.
If you can’t find a stdlib symbol, check whether you need to import a Pulse runtime module or add an Astra package to [dependencies]. The layering is intentional.

Next steps

Astra packages

The full list of first-party packages.

Pulse.Console reference

The console runtime service in detail.