Skip to content

A family: register verified payloads with the ecosystem's own mechanism instead of copying them out #149

Description

@avrabe

Prompted by the maintainer liking criticalup's link feature (v1.5.0):
criticalup link create registers the pinned toolchain as a real rustup
toolchain, so cargo +ferrocene build works. It is interoperability instead of
replacement — plug into the ecosystem's own mechanism rather than only owning
PATH.

varve borrows the rustup pattern (shims that re-resolve the pin per working
directory, REQ-SHIM-002) but has no rustup integration.

The distinction worth naming

Everything varve offers a consumer today is an export: export-cargo,
export-vsix, export-sdk, export-bazel, export-bazel-distdir,
export-crates-vendor. All materialise a copy out of the store.

A link would register a pointer, so the other tool reads varve's
verified bytes in place. Three consequences, and they get more valuable as
payloads get bigger:

  • No duplication. Copying a 2 GB SDK tree, or rustdoc for a workspace, to
    use it is a real cost (see verify and inspect are single-threaded and silent: ~9s on a 2 GB SDK layer vs <1s without one #141, where 2 GB already costs ~9s just to hash).
  • The pin stays authoritative. Switch layers and a link follows; a copy does
    not. write_export_stamp exists precisely because an exported directory goes
    stale the moment the pin moves — a link has no staleness to stamp.
  • One less place for the bytes to be wrong. A copy can be edited after
    export and still look exported.

Candidates, most valuable first

1. varve link rustup — the direct analogue, and the one that buys the
most: every IDE, rust-analyzer, and CI that already speaks rustup would then
consume varve-verified bytes with no varve-specific support.

Honest caveat: there is nothing to link today. The pulseengine realm carries
pulseengine tools (rivet, synth, meld, kilnd, loom, wsc, spar…), not
rustc/cargo. This becomes real when a realm carries a Rust toolchain — and
the obvious candidate is Ferrocene itself, pinned and verified by varve and
registered into rustup. Worth considering separately; not assumed here.

Second caveat: rustup toolchain link expects a toolchain-shaped directory
(bin/rustc, lib/, …). varve's store is payloads/<name>/<version>, which is
not that shape. So this needs a shaped view — a small tree of symlinks into
the verified store. That is a link in the truest sense: no bytes duplicated, and
the bytes that are read are the verified ones.

2. varve link cargo — instead of export-cargo materialising a registry,
point .cargo/config.toml source-replacement at the store directly.

3. varve link code — instead of export-vsix writing .vsix files for
code --install-extension, install from the store.

Immediate, in-scope consequence

REQ-LAYERDOCS-001's viewer (varve-serve) should read the store, not an
export. That is this idea applied at once, and it is strictly better for a
1.2 MB traceability bundle and much better for rustdoc. varve export-docs
stays, for handing a copy to someone or publishing a CI artifact — the two
answer different questions.

Not asking for a design

What this issue asks is whether link becomes a first-class family beside
export, and if so whether rustup is the first one — which likely depends on
whether a realm will carry a Rust toolchain.

Source: https://criticalup.ferrocene.dev/ (and criticalup CHANGELOG v1.5.0)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions