A consumer example for the cabin-ports/cli11 registry package,
published from the curated
ports/CLI11/2.6.2/
package directory. The program includes the header-only CLI11 command line
parser, declares one option with a default, parses argv, and
prints the parsed value plus the compiled-in CLI11 version.
This is not itself a port and does not vendor or copy CLI11
sources. It demonstrates depending on a curated header-only C++
library through an ordinary scoped registry package. The first
cabin build resolves the dependency against the registry index,
downloads the published package archive, verifies its checksum,
extracts it under Cabin's cache, and then builds normally;
subsequent builds reuse the cache.
cd examples/cli11-usage
cabin build
cabin runExpected output (the version is whatever the resolved package pins):
CLI11 parsed count: 3
CLI11 version: 2.6.2
The first cabin build needs the registry. Reads resolve through
the hosted registry by default, and verified packages download
without an account or token - cabin login is only needed to publish (see
docs/remote-registry.md). Once the package is cached, later builds reuse the downloaded
archive without re-fetching it. Resolving still consults the
registry index, so a fully offline build needs a local index; see
docs/vendoring-offline.md for
the cabin vendor + --offline --index-path workflow.
The integration test for this example
(crates/cabin/tests/cabin_examples.rs::cli11_usage_builds_and_runs)
is #[ignore = "requires external network"]: it stages the
committed ports into a local file registry through the publisher
pipeline and builds this example against it with --index-path.