Skip to main content

USAGE

Constant USAGE 

Source
pub(crate) const USAGE: &str = "\
cargo psync: check #[psync::graph] rewrites against the compiled bodies of callees

USAGE:
    cargo psync check [--deny] [--notes] [--facts] [CARGO CHECK ARGS...]
    cargo psync build [--deny] [--notes] [CARGO BUILD ARGS...]
    cargo psync fix [CARGO CHECK ARGS...]
    cargo psync summaries [CRATE] [--all]
    cargo psync pdg [FUNCTION] [--entries] [--from HANDLER]

check       run `cargo check` with psync's driver; warn where a rewrite runs conflicting
            effects at once, writes before an earlier exit, or prefetches loop writes
  --deny    make findings errors (exit status 1)
  --notes   also report output order and shared interior-mutable state
  --facts   then also check the schedule the macro builds from the compiler's facts
build       compute the compiler's facts about every call in #[psync::graph] functions, let the
            macro schedule with them (instead of judging calls by their names), check that
            schedule, then `cargo build` with it
fix         check, then insert `#[psync::seq]` before every statement or loop with a warning
            (review the result: `#[psync::speculate]` may be the better hint for idempotent writes)
pdg         print, for each #[psync::graph] function and `async fn` the last `check` saw, its
            calls with effects and its awaits, each with the branches it depends on
  FUNCTION  only functions whose path contains this text
  --entries list the entry points instead: `main` and the handlers registered with axum or
            actix-web, with their routes
  --from H  the graph of handler H (a path, as --entries prints it) and of every function of
            the crate it calls, transitively: what one request runs
summaries   print each function's effects as computed by the last `check`
  CRATE     only this crate (default: every crate with findings or rewrites)
  --all     include functions without effects but with opaque calls
";