Specs, not packages

A registry of machine-readable library specifications. AI agents fetch a spec and generate verified native implementations in any language — no dependency, no supply chain.

6Specs
2Authors

How it works

A spec is the contract. The implementation is generated and verified — in whatever language you ship.

1

Fetch a spec

Pull a machine-readable specification — types, functions, behavioral contracts — over a plain HTTP API.

2

Generate native code

An agent reads the spec and writes a first-party implementation in your language. No third-party package to trust.

3

Verify with test vectors

Every spec ships test vectors. Run them against the generated code to prove it matches the contract.

Why Canra

At first it seems backwards: why have every project regenerate code instead of reusing a package? Because generating from a verified spec buys you things a dependency can't.

No supply chain risk

Nothing runs from a third party. The implementation is generated and reviewed in your own tree — fully auditable, no opaque transitive dependencies.

Minimal footprint

You generate only what you actually use, instead of pulling in a whole library — and everything it depends on — for one function.

No licensing concerns

Generated from an open spec, the code is yours. No package licenses to track, audit, or comply with across your dependency tree.

AI agents make writing code cheap — and each spec's detailed contracts and test vectors keep what they write correct. It works with any language and any agent, and it's a natural fit for AI-first toolchains like Maxon.

agent session
# 1. fetch the spec + test vectors
$ curl https://canra.dev/api/specs/canra/iso-8601
# 2. generate a native implementation, any language
$ agent generate iso-8601 --lang rust
# 3. verify against the spec's test vectors
$ agent verify iso-8601
  42 vectors passed — implementation matches the contract

Publish your spec

Define a library once, as a verifiable spec. Let every language — and every agent — implement it natively.