Skip to content

Packages Overview

Kelvra uses @import(...) for both source modules and native packages. The package manager supports local, workspace, Git, and registry dependencies with lockfiles, offline installs, signed registry metadata, publishing, and advisory audits.

  • string literal paths such as "./math.kel" resolve as source modules
  • hosted module paths such as "github.com/acme/math" resolve through installed Git module metadata
  • bare names such as "math" and "window" resolve as packages
  • package metadata already exists in kelvra.toml, kelvra.lock, and package.api.kel, with legacy package.toml still accepted for compatibility

Add a Git module by tag, then install before importing it:

Terminal window
kelvra add github.com/acme/math@v1.0.0
kelvra install
const math = @import("github.com/acme/math")

Project-maintained packages such as json, http, ecs, and window live in their own GitHub repositories and are cataloged under Official Packages.

The runtime repository also contains small packages used to test the compiler, loader, and native ABI:

  • packages/examples/math/
  • packages/examples/counter/

These reference packages are development fixtures, not substitutes for the independently versioned packages in the kelvralang organization. Kelvra and its package ecosystem are still pre-1.0. Commit kelvra.lock for applications and use kelvra install --locked in CI when reproducibility matters.