diff --git a/pages/common/cargo-clean.md b/pages/common/cargo-clean.md new file mode 100644 index 000000000..1500c39f1 --- /dev/null +++ b/pages/common/cargo-clean.md @@ -0,0 +1,20 @@ +# cargo clean + +> Remove generated artifacts in the `target` directory. +> More information: . + +- Remove the entire `target` directory: + +`cargo clean` + +- Remove documentation artifacts (the `target/doc` directory): + +`cargo clean --doc` + +- Remove release artifacts (the `target/release` directory): + +`cargo clean --release` + +- Remove artifacts in the directory of the given profile (in this case, `target/debug`): + +`cargo clean --profile {{dev}}` diff --git a/pages/common/cargo-fmt.md b/pages/common/cargo-fmt.md new file mode 100644 index 000000000..478eb1268 --- /dev/null +++ b/pages/common/cargo-fmt.md @@ -0,0 +1,16 @@ +# cargo fmt + +> Run `rustfmt` on all source files in a Rust project. +> More information: . + +- Format all source files: + +`cargo fmt` + +- Check for formatting errors without writing to the files: + +`cargo fmt --check` + +- Pass arguments to each `rustfmt` call: + +`cargo fmt -- {{rustfmt_args}}`