Packages

Eta package workflows are driven by eta.toml and eta.lock.

Core commands

eta add <pkg> --path <dir>
eta remove <pkg>
eta update
eta build
eta test
eta vendor
eta clean --all

Repository build helper

For repo-local package rebuilds (excluding packages/stdlib), use:

scripts/build_packages.ps1    # Windows (PowerShell)
scripts/build_packages.sh     # Linux/macOS

These helpers:

Workspace selection flags

These flags are supported by workspace-aware commands (tree, build, test, bench, run, vendor, clean, update, add, remove, install):

--workspace
-p, --package <name>
--exclude <name>
--manifest-path <path>

Rules:

Default selection behavior:

Dependency source forms

[dependencies]
local_dep = { path = "../local_dep" }
git_dep = { git = "https://example.com/repo.git", rev = "0123456789abcdef0123456789abcdef01234567" }
tar_dep = { tarball = "../dep.tar.gz", sha256 = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" }

rev must be a full 40-character git commit id. sha256 must be a 64-character hex digest.

Native sidecar metadata

Package manifests can declare native sidecar artifacts:

[native]
kind = "sidecar"
abi = "eta-native-v1"
id = "example_native"
entry = "eta_register_extension_v1"

[[native.targets]]
triple = "x86_64-pc-windows-msvc"
artifact = "native/amd64/libs/eta_example_native.dll"
sha256 = "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"

Rules:

When present, lockfile package rows may also include: native_id, native_abi, native_entry, native_target_triple, native_artifact_relpath, and native_sha256. The resolver selects the [[native.targets]] row matching the current target triple when writing these lockfile fields.

Runtime sidecar loading

etai, eta_repl, and etac load sidecars before compile/run.

Package context behavior:

Non-package behavior:

Notes:

Layout

eta build writes artifacts to .eta/target/<profile>/ for standalone packages. In workspace mode, member artifacts use a shared layout: .eta/target/<profile>/<member-name>/... under the workspace root. eta vendor materializes dependencies under .eta/modules/ in lockfile order (workspace commands use the workspace root by default). For non-workspace dependencies that carry native metadata, materialization verifies native_sha256 before commands proceed.

Tooling integration