Skip to main content
A package is the unit of build, versioning, dependency, and publication in Kairo. Every Kairo project is a package. A package has one kairo.toml manifest at its root, one or more .ak source files, and a declared kind: either an application or a library.

Package kinds

application

Has an entrypoint. Directly executable by Pulse. Produces a runnable artifact.

library

No entrypoint. Provides types and functions to other packages. Not directly runnable.
The kind is declared in kairo.toml:

Standard layout

Kairo packages follow a predictable folder structure:
File paths are conventions for humans. The authoritative name for a module is its module declaration inside the source file, not its folder path.

The manifest

Every package has a kairo.toml at its root. It declares:
  • Package identity: name, version, kind
  • Application settings (entrypoint, runtime target) when the kind is application
  • Dependencies on other packages
  • Publish metadata when relevant
Minimal application manifest:
Minimal library manifest:
See the manifest reference for every field.

Modules within a package

A package contains one or more modules. Each .ak file declares exactly one module.
Module names are PascalCase, dot-separated, and independent of folder layout. Multiple files may contribute to the same module.

Dependencies

Packages depend on other packages by name and version, declared in kairo.toml. Forge resolves dependencies deterministically and writes the result to forge.lock.
See Dependencies for the full model.

Applications vs. libraries

Only packages with kind = "application" can be executed by Pulse. Library packages are consumed by other packages via [dependencies].

Next steps

Manifest reference

Every kairo.toml field explained.

Dependencies

Declaring, restoring, and locking dependencies.