Pinned embedded package manager
  • Rust 52.8%
  • D 43.8%
  • Makefile 3.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
felix 54cad8f894
Some checks are pending
ci / test (push) Has started running
ci: run the test suite before clippy
2026-10-26 11:57:55 +08:00
.forgejo/workflows ci: run the test suite before clippy 2026-10-26 11:57:55 +08:00
.target fix: satisfy clippy for the dependency installer 2026-10-26 10:46:43 +08:00
src fix: satisfy clippy for the dependency installer 2026-10-26 10:46:43 +08:00
tests feat: apply integration markers 2026-10-26 10:44:08 +08:00
.gitignore feat: extract loom CLI and integration layer 2026-10-26 10:00:59 +08:00
Cargo.lock feat: apply integration markers 2026-10-26 10:44:08 +08:00
Cargo.toml feat: apply integration markers 2026-10-26 10:44:08 +08:00
CHANGELOG.md feat: apply integration markers 2026-10-26 10:44:08 +08:00
LICENSE feat: extract loom CLI and integration layer 2026-10-26 10:00:59 +08:00
README.md feat: apply integration markers 2026-10-26 10:44:08 +08:00

loom

loom installs pinned embedded C units into a project.

It is the CLI and lockfile layer, independent of the catalog. The catalog lives at https://git.pcbsmt.me/rh/emb-loom, and the site at https://loom.pcbsmt.me.

loom search "load cell"
loom add ads1115
loom integrate
loom verify
loom guard --staged

Registry

A registry is a directory with loom.json and loom.lock. Select it with --registry DIR, EMB_LOOM_REGISTRY, or the package/project fallback paths. The CLI never bundles a catalog.

--registry also accepts a Git URL (https://, ssh://, git@, or file://). The registry is cloned into $XDG_CACHE_HOME/loom/registries (or ~/.cache/loom/registries). Set LOOM_REGISTRY_REFRESH=1 to discard the cache before the next clone.

Publish and yank

loom publish ./unit --id my-unit --kind driver --registry ./registry
loom yank my-unit --registry ./registry --prune

publish adds or replaces a unit in an existing registry. yank removes it from the index and lock; --prune also removes its files.

Pack

loom pack ./my-unit --id my-unit --kind driver --out ./registry

The output is a small registry containing loom.json, loom.lock, the unit, and its license. loom add can consume it directly.

Registry index

loom index --out index.json

The index records unit versions, paths, requirements, and SHA-256 values. Publish it with the catalog; consumers can use a Git/HTTPS registry URL.

Doctor

loom doctor

Checks installed unit hashes, the generated firmware/loom fragments, and whether a CMake/Make/Cargo file already includes them. It reports warnings for missing build includes and fails on modified units or stale fragments.

Integrate

loom integrate writes:

firmware/loom/loom.mk
firmware/loom/loom.cmake
firmware/loom/loom.cargo.rs
firmware/loom/README.md

Make/CMake/Cargo can include the generated fragments. loom add, remove, install, and update refresh them automatically. loom integrate --check fails when they are stale.

loom integrate --apply adds a marker block to an existing Makefile, CMakeLists.txt, or build.rs; rerunning replaces the block. CMake accepts --target NAME to emit loom_attach(NAME).

For Cargo, loom.cargo.rs exposes LOOM_SOURCES, LOOM_INCLUDE_DIRS, and build(); include it from build.rs and add cc as a build dependency.

License

AGPL-3.0-or-later. Catalog units keep their own MIT/BSD/Apache licenses.