Project imports
Split a growing application into readable source files. Import paths are resolved within the project and checked together with the application. import "./billing.zyl" as billing
Reusable by design
Build a capability once, check it with the compiler, and compose it into the next application. Zelyra packages keep interfaces typed, effects visible and project setup reproducible.
Three ways to compose
A shared file, a local package or a signed source artifact: choose the reuse level that fits the team and deployment you already have.
Split a growing application into readable source files. Import paths are resolved within the project and checked together with the application. import "./billing.zyl" as billing
Give a reusable capability its own manifest, version, public exports and effect ceiling. Lock the source and use it through a package namespace. import "pkg:money" as money
Publish a source artifact and a deterministic index for controlled distribution. Add or update is explicit; checking and running a locked project can stay offline. Package guide
A concrete business example
The package owns the calculation; the invoice application owns the document and customer workflow. The boundary is a typed function, so each side can evolve without copying the calculation.
The function accepts exact Decimal values, declares its input contract and returns the calculated gross amount. Zelyra checks the package and its caller as one dependency graph.
pub fn calculate_gross(net: Decimal, rate: Decimal) -> Decimal
requires { net >= decimal("0.00") && rate >= decimal("0.00") }
ensures { result >= net }
{
tax = (net * rate) / decimal("100.00")
return net + tax
}
import "pkg:money" as money
fn main() {
gross = money::calculate_gross(decimal("1250.00"), decimal("19.00"))
print(gross)
}
From source to shared capability
Start with a local package. The manifest names the package; the application manifest declares the path and compatible version.
Generate a small starter module without overwriting existing files.
zelyra module init packages/money --name money --version 0.1.0Add a local path and version range to the project manifest.
[dependencies.money]
path = "packages/money"Record the resolved package source so team members can reproduce the same dependency state.
zelyra package lock .Type-check the application, inspect exports and review the module dependency plan.
zelyra check main.zyl
zelyra module list main.zylIncluded in the workflow
Package tooling gives teams a concrete view of source, exported symbols, effects, settings and distribution before a module becomes part of an application.
`module list` and `module plan` describe aliases, public exports, source checksums and the selected dependency graph in stable text or JSON.
Only explicitly public symbols cross the package boundary. Types, imports, contracts and declared capabilities are checked by Zelyra.
Describe supported settings in the manifest and configure them per application. Secret values are referenced through environment variables.
Inspect the source closure and unresolved references before packaging. Use the report to complete and validate deployment-specific configuration.
Trust you can inspect
A lockfile checksum makes source changes visible. A trusted signing key authenticates the signed artifact. Neither is a substitute for reviewing code, granting application capabilities deliberately or testing the package in your own project.
Read package security detailsA growing module landscape
A module can capture a business rule, a data adapter or a reusable workflow. Keep each package focused, give it a typed public interface and compose larger applications from those parts.
Centralize calculations and rules that must behave consistently across invoices, offers and reports.
Keep parsing, mapping and validation close to a typed interface so each application can decide how to authorize and run it.
Compose document generation and delivery capabilities with the application’s own permissions, outbox and deployment configuration.
Start with the checked tax example, then explore the module guide and real multi-package project.