Skip to main content

Crate cargo_psync

Crate cargo_psync 

Source
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 check and build.

Constantsยง

USAGE ๐Ÿ”’

Functionsยง

build ๐Ÿ”’
cargo psync build: compute the compilerโ€™s facts, check the schedule the macro builds from them, then run the real cargo build with them.
check ๐Ÿ”’
check_and_link ๐Ÿ”’
Check, link, and check again if linking resolved new dyn calls (the driver recompiles the workspaceโ€™s crates when linked.json changes).
fix ๐Ÿ”’
cargo psync fix: check, then apply every warningโ€™s fix.
link ๐Ÿ”’
Link every crateโ€™s summaries: resolve dyn and generic trait calls over the whole build and write linked.json (for the driver) and facts.tsv (for the macro). Returns whether the resolution changed since the last run.
main ๐Ÿ”’
opts ๐Ÿ”’
pass ๐Ÿ”’
One cargo check with the driver. facts makes the macro schedule with the compilerโ€™s facts.
pdg ๐Ÿ”’
psync_dir ๐Ÿ”’
target/psync under 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 ๐Ÿ”’