Expand description
cargo psync: the front end of psyncโs compiler-level checks.
cargo psync check [--deny] [--notes] [CARGO CHECK ARGS...]
cargo psync build [--deny] [--notes] [CARGO BUILD ARGS...]
cargo psync summaries [CRATE] [--all]
cargo psync pdg [FUNCTION] [--entries] [--from HANDLER]check runs cargo check with psync-driver as RUSTC_WRAPPER, in its own target directory
(target/psync), so the normal build is untouched. Every crate in the build gets effect
summaries; crates with #[psync::graph] rewrites are checked against them.
After every check, a link step resolves dyn and generic trait calls over the whole build and
writes the facts the macro can schedule with; build does that, checks the schedule the macro
builds from the facts, and runs cargo build with them.
summaries prints the summaries the last check computed, and pdg the dependence graphs of
the annotated functions and async fns: their effects and awaits, each with the branches that
decide whether it runs.
Re-exportsยง
pub(crate) use CrateFindings;๐pub(crate) use CrateSummaries;๐pub(crate) use Severity;๐pub(crate) use env;๐pub(crate) use Path;๐pub(crate) use PathBuf;๐pub(crate) use Command;๐pub(crate) use ExitCode;๐
Structsยง
- Opts ๐
- Options shared by
checkandbuild.
Constantsยง
- USAGE ๐
Functionsยง
- build ๐
cargo psync build: compute the compilerโs facts, check the schedule the macro builds from them, then run the realcargo buildwith them.- check ๐
- check_
and_ ๐link - Check, link, and check again if linking resolved new
dyncalls (the driver recompiles the workspaceโs crates whenlinked.jsonchanges). - fix ๐
cargo psync fix: check, then apply every warningโs fix.- link ๐
- Link every crateโs summaries: resolve
dynand generic trait calls over the whole build and writelinked.json(for the driver) andfacts.tsv(for the macro). Returns whether the resolution changed since the last run. - main ๐
- opts ๐
- pass ๐
- One
cargo checkwith the driver.factsmakes the macro schedule with the compilerโs facts. - pdg ๐
- psync_
dir ๐ target/psyncunder the projectโs target directory.- report ๐
- Print the findings of the last pass; returns the number of warnings.
- stamp ๐
- A stable short hash of a fileโs contents (empty file:
none). - summaries ๐
- target_
dir_ ๐from_ metadata