Packages
Khora’s standard library holds the contracts that two pieces of software must
agree on: Db’s shape, the trace vocabulary, the row and cell types a result
set is made of. The things that speak a protocol are packages, because a
protocol is versioned by somebody else and a release schedule that is not
Khora’s should not be able to hold up a compiler release.
That split is settled in the ecosystem design note, and it means a real program reaches for packages early. These pages document the ones maintained in the Khora repository.
Naming one in a manifest
Section titled “Naming one in a manifest”There is no registry yet. A dependency names where it lives — a repository, a revision, and the directory the package’s own manifest sits in:
[dependencies]postgres = { git = "https://github.com/codyspate/khoralang", rev = "v0.4.0", subdir = "packages/postgres" }khora.lock records the commit each dependency resolved to, so a build stays
reproducible even when the revision is a branch name. Pin a tag when the
dependency lives in the compiler’s own repository — rev = "v0.4.0" for
a published 0.4.0 toolchain, or rev = "v0.4.0-rc.2" for that published
candidate — because main moves ahead of the compiler you have, and a package
from a newer commit may use std that yours lacks. These tags must exist on
the release page before the corresponding example can be installed.
khora install <url> --subdir <dir> writes the line for you. The full set of
dependency keys is in the manifest reference.
A registry is a 1.0 question. Until there is one, git and subdir are the
whole mechanism, and a monorepo of packages works because subdir exists.
What is here
Section titled “What is here”postgres— a PostgreSQL client that speaks the wire protocol directly, with nolibpqto install. Documented here.ai— the effect a caller names when it wants model inference, so the provider stays the caller’s choice. It declaresLLMServiceandextractand implements no provider: there is no HTTP and no tokenizer in it, and a handler supplies those. No page here yet — readpackages/ai/src/llm.kh, whose module comment is the documentation.otlp— an exporter for the trace vocabulary instd::trace, over OTLP/HTTP JSON. No page here yet — readpackages/otlp/README.md.
Each of the three is depended on the same way, with git and subdir; not
having a page here is a gap in this section rather than a difference in how the
package is used.
These are not covered by the language’s compatibility promise
Section titled “These are not covered by the language’s compatibility promise”Compatibility is a statement about the
language and std. A package in this repository is versioned with the
compiler for convenience, not as a promise: it can break between releases when
the protocol underneath it changes, and the reason to keep it out of std is
exactly that it might need to.
postgres has a page here, and the honest list of gaps is at the bottom of it.
For ai and otlp that list is in the source linked above.
Khora 0.4.0built frombd964738afb6on 2026-10-17 20:41ZVersioningSecurityContributingReleasesSource