The wisdom of a settled edition
We do not chase novelty. Our edition was current when we adopted it, and we have seen no reason to check since.
It already has one, written in your Cargo.toml, your
dependency table, your lint configuration and your release profile. You have never
had the courage to write it down.
cargo-manifesto reads your manifests and writes down the principles behind every decision you have already made.
cargo install cargo-manifesto --locked
That engineer has no manifesto, so when their team adds serde, someone has to explain it. When yours adds serde, it discovers that it has always stood on the shoulders of others, and while their CI checks the code, yours checks the convictions.
Ensure your team has always been right.
Change the manifest below, and our position will be clarified.
Cargo.toml
[package]
name = "enduring-convictions"
version = "0.1.0"
edition = "2021"
[profile.release]
panic = "unwind"
MANIFESTO.md
We do not chase novelty. Our edition was current when we adopted it, and we have seen no reason to check since.
Dependencies are an abdication of engineering responsibility. We accept the burden of writing our own solutions, because every line under our control is a line we can justify. We have justified all of them.
Mistakes are part of every serious undertaking, and should not end the conversation. Somewhere up the stack is a caller who will know what to do. We believe in giving every mistake the opportunity to become someone else's responsibility.
Amendments recorded: 0 Positions changed: 0
No amendments have been necessary. Change the manifest to record one.
The manifest is illustrative. Article and amendment text comes from the
CLI’s catalogue;
cargo manifesto --amend produces the same amendments for a real project.
cargo-manifesto runs on itself. These articles were found in its own
Cargo.toml and Cargo.lock.
All rules are mandatory except where we exercised judgment. Judgment is recognized by the presence of an allowance. Every outcome of our lint policy is therefore a successful application of it.
Cargo is complete, and we would never presume to extend it. Cargo runs cargo-manifesto by name, which makes it part of Cargo, and Cargo is complete.
For every package there is one correct version. Our lockfile records several versions of winnow, and we stand firmly behind the correct one.
These principles have guided this project from the beginning.
The movement asks little of its members: each observance is a single command.
cargo manifestocargo manifesto --explaincargo manifesto --fixMANIFESTO.md. Only the philosophy is corrected.cargo manifesto --checkMANIFESTO.md
is out of date, so CI can enforce agreement.cargo manifesto --format jsoncargo manifesto --amend before.jsoncargo manifesto --originWhen the implementation moves and the manifesto does not, --check fails the
build with:
The implementation has advanced beyond its principles. Run cargo manifesto --fix to restore historical consistency.
In the beginning, programmers had principles. Then they had deadlines.
Our movement began at an architecture review of exceptional historical significance. A dependency had already shipped when a principle, consulted somewhat later, objected. Removing the dependency would require work; amending the principle would require a sentence. The code compiled, and the principle had no tests. By unanimous agreement of those still in the meeting, the sentence was amended.
The principle, it emerged, had only ever been a dev-dependency.
Let our choices guide our principles.
The full
account is available from cargo manifesto --origin.
You did, in Cargo.toml; we only transcribed them.
That is a documentation issue, resolved by cargo manifesto --fix. The
code has done nothing wrong and will not be contacted.
Paste them between the markers in MANIFESTO.md and run cargo
manifesto --check, which will fail; --fix will then replace them
with the ones you actually hold.
You have not. Save a baseline with cargo manifesto --format json >
before.json, make the change, and run cargo manifesto --amend
before.json to learn what you always meant. Amendments may be recorded; changes
of position may not.
No. Every position was written in advance and compiled into the binary, so no conclusion is ever reached in haste, and the same manifest produces the same manifesto, byte for byte, every time. No committee has managed that.
It does not need to, since the code is presumed right. It reads
Cargo.toml through cargo metadata --offline and any existing
Cargo.lock, and never reads Rust source, builds anything, runs build
scripts, or fetches dependencies. Settings are reported as requests, not results.
Never; we do not edit scripture. --fix writes only between two markers in
MANIFESTO.md, or another Markdown file you choose, and preserves every
other byte of it, including the parts where you disagreed.
Your project already has principles. All it lacks is the courage to publish them.
cargo install cargo-manifesto --locked
cargo manifesto
Requires Rust 1.91 or later. Output goes to stdout; nothing is written
without --fix.