cargo-options-0.6.0/.cargo_vcs_info.json0000644000000001360000000000100136230ustar { "git": { "sha1": "b7cb37fc3b3a8ce278c6d1441dca96b5dae20441" }, "path_in_vcs": "" }cargo-options-0.6.0/.codespellrc000064400000000000000000000000751046102023000147150ustar 00000000000000[codespell] ignore-words-list = crate skip = ./.git,./target cargo-options-0.6.0/.github/workflows/CI.yml000064400000000000000000000037051046102023000170330ustar 00000000000000on: push: branches: - main pull_request: name: CI concurrency: group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true jobs: check: name: Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable override: true - uses: actions-rs/cargo@v1 with: command: check args: --all test: name: Test Suite runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] rust: [stable, '1.64.0'] steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: ${{ matrix.rust }} override: true - name: Cache cargo build uses: Swatinem/rust-cache@v1 - uses: actions-rs/cargo@v1 with: command: test fmt: name: Rustfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable components: rustfmt override: true - uses: actions-rs/cargo@v1 with: command: fmt args: --all -- --check clippy_check: name: Clippy Check runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable components: clippy override: true - uses: actions-rs/clippy-check@v1 with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-features spellcheck: name: spellcheck runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: codespell-project/actions-codespell@master cargo-options-0.6.0/.gitignore000064400000000000000000000000231046102023000143760ustar 00000000000000/target Cargo.lock cargo-options-0.6.0/Cargo.lock0000644000000500010000000000100115720ustar # This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 3 [[package]] name = "autocfg" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "cargo-options" version = "0.6.0" dependencies = [ "clap", "trycmd", ] [[package]] name = "cc" version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cfg-if" version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "clap" version = "4.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" dependencies = [ "bitflags", "clap_derive", "clap_lex", "is-terminal", "once_cell", "strsim", "termcolor", "terminal_size", ] [[package]] name = "clap_derive" version = "4.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8" dependencies = [ "heck", "proc-macro-error", "proc-macro2", "quote", "syn", ] [[package]] name = "clap_lex" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade" dependencies = [ "os_str_bytes", ] [[package]] name = "concolor" version = "0.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "318d6c16e73b3a900eb212ad6a82fc7d298c5ab8184c7a9998646455bc474a16" dependencies = [ "bitflags", "concolor-query", "is-terminal", ] [[package]] name = "concolor-query" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82a90734b3d5dcf656e7624cca6bce9c3a90ee11f900e80141a7427ccfb3d317" [[package]] name = "content_inspector" version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7bda66e858c683005a53a9a60c69a4aca7eeaa45d124526e389f7aec8e62f38" dependencies = [ "memchr", ] [[package]] name = "crossbeam-channel" version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ "cfg-if", "crossbeam-utils", ] [[package]] name = "crossbeam-deque" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" dependencies = [ "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" version = "0.9.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", "memoffset", "scopeguard", ] [[package]] name = "crossbeam-utils" version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ "cfg-if", ] [[package]] name = "dunce" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bd4b30a6560bbd9b4620f4de34c3f14f60848e58a9b7216801afcb4c7b31c3c" [[package]] name = "either" version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "errno" version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" dependencies = [ "errno-dragonfly", "libc", "winapi", ] [[package]] name = "errno-dragonfly" version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa68f1b12764fab894d2755d2518754e71b4fd80ecfb822714a1206c2aab39bf" dependencies = [ "cc", "libc", ] [[package]] name = "escargot" version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f5584ba17d7ab26a8a7284f13e5bd196294dd2f2d79773cff29b9e9edef601a6" dependencies = [ "log", "once_cell", "serde", "serde_json", ] [[package]] name = "fastrand" version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ "instant", ] [[package]] name = "filetime" version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" dependencies = [ "cfg-if", "libc", "redox_syscall", "windows-sys", ] [[package]] name = "glob" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" [[package]] name = "hermit-abi" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" dependencies = [ "libc", ] [[package]] name = "humantime" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "humantime-serde" version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57a3db5ea5923d99402c94e9feb261dc5ee9b4efa158b0315f788cf549cc200c" dependencies = [ "humantime", "serde", ] [[package]] name = "indexmap" version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown", ] [[package]] name = "instant" version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if", ] [[package]] name = "io-lifetimes" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" dependencies = [ "libc", "windows-sys", ] [[package]] name = "is-terminal" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" dependencies = [ "hermit-abi", "io-lifetimes", "rustix", "windows-sys", ] [[package]] name = "itertools" version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ "either", ] [[package]] name = "itoa" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "libc" version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "linux-raw-sys" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" [[package]] name = "log" version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ "autocfg", ] [[package]] name = "nom8" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8" dependencies = [ "memchr", ] [[package]] name = "normalize-line-endings" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num_cpus" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ "hermit-abi", "libc", ] [[package]] name = "once_cell" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "os_pipe" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6a252f1f8c11e84b3ab59d7a488e48e4478a93937e027076638c49536204639" dependencies = [ "libc", "windows-sys", ] [[package]] name = "os_str_bytes" version = "6.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b7820b9daea5457c9f21c69448905d723fbd21136ccf521748f23fd49e723ee" [[package]] name = "proc-macro-error" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", "syn", "version_check", ] [[package]] name = "proc-macro-error-attr" version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ "proc-macro2", "quote", "version_check", ] [[package]] name = "proc-macro2" version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] [[package]] name = "rayon" version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" dependencies = [ "either", "rayon-core", ] [[package]] name = "rayon-core" version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" dependencies = [ "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", "num_cpus", ] [[package]] name = "redox_syscall" version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] name = "remove_dir_all" version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ "winapi", ] [[package]] name = "rustix" version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" dependencies = [ "bitflags", "errno", "io-lifetimes", "libc", "linux-raw-sys", "windows-sys", ] [[package]] name = "ryu" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "same-file" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" dependencies = [ "winapi-util", ] [[package]] name = "scopeguard" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "serde" version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_json" version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" dependencies = [ "itoa", "ryu", "serde", ] [[package]] name = "shlex" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" [[package]] name = "similar" version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "420acb44afdae038210c99e69aae24109f32f15500aa708e81d46c9f29d55fcf" [[package]] name = "snapbox" version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34eced5a65e76d5a00047986a83c65f80dc666faa27b5138f331659e2ca6bcf5" dependencies = [ "concolor", "content_inspector", "dunce", "filetime", "libc", "normalize-line-endings", "os_pipe", "similar", "snapbox-macros", "tempfile", "wait-timeout", "walkdir", "windows-sys", "yansi", ] [[package]] name = "snapbox-macros" version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "485e65c1203eb37244465e857d15a26d3a85a5410648ccb53b18bd44cb3a7336" [[package]] name = "strsim" version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "syn" version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "tempfile" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if", "fastrand", "libc", "redox_syscall", "remove_dir_all", "winapi", ] [[package]] name = "termcolor" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] [[package]] name = "terminal_size" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb20089a8ba2b69debd491f8d2d023761cbf196e999218c591fa1e7e15a21907" dependencies = [ "rustix", "windows-sys", ] [[package]] name = "toml_datetime" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" dependencies = [ "serde", ] [[package]] name = "toml_edit" version = "0.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a34cc558345efd7e88b9eda9626df2138b80bb46a7606f695e751c892bc7dac6" dependencies = [ "indexmap", "itertools", "nom8", "serde", "toml_datetime", ] [[package]] name = "trycmd" version = "0.14.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "01662d21325d18cd4acae7e1dc9f29a2a88b7fbb7f9bc427c4a692aaec5773ac" dependencies = [ "escargot", "glob", "humantime", "humantime-serde", "rayon", "serde", "shlex", "snapbox", "toml_edit", ] [[package]] name = "unicode-ident" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "wait-timeout" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" dependencies = [ "libc", ] [[package]] name = "walkdir" version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", "winapi", "winapi-util", ] [[package]] name = "winapi" version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ "winapi-i686-pc-windows-gnu", "winapi-x86_64-pc-windows-gnu", ] [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ "winapi", ] [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] name = "windows_aarch64_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "yansi" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" cargo-options-0.6.0/Cargo.toml0000644000000016110000000000100116200ustar # THIS FILE IS AUTOMATICALLY GENERATED BY CARGO # # When uploading crates to the registry Cargo will automatically # "normalize" Cargo.toml files for maximal compatibility # with all versions of Cargo and also rewrite `path` dependencies # to registry (e.g., crates.io) dependencies. # # If you are reading this file be aware that the original Cargo.toml # will likely look very different (and much more reasonable). # See Cargo.toml.orig for the original contents. [package] edition = "2018" name = "cargo-options" version = "0.6.0" description = "Reusable common Cargo command line options" readme = "README.md" keywords = [ "clap", "cargo", "cli", ] license = "MIT" repository = "https://github.com/messense/cargo-options" [dependencies.clap] version = "4.0.0" features = [ "derive", "env", "wrap_help", ] [dev-dependencies.trycmd] version = "0.14.0" features = ["examples"] cargo-options-0.6.0/Cargo.toml.orig000064400000000000000000000010101046102023000152720ustar 00000000000000[package] name = "cargo-options" version = "0.6.0" edition = "2018" description = "Reusable common Cargo command line options" license = "MIT" keywords = ["clap", "cargo", "cli"] readme = "README.md" repository = "https://github.com/messense/cargo-options" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] clap = { version = "4.0.0", features = ["derive", "env", "wrap_help"] } [dev-dependencies] trycmd = { version = "0.14.0", features = ["examples"] } cargo-options-0.6.0/LICENSE000064400000000000000000000020511046102023000134160ustar 00000000000000MIT License Copyright (c) 2022 messense Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. cargo-options-0.6.0/README.md000064400000000000000000000011571046102023000136760ustar 00000000000000# cargo-options [![GitHub Actions](https://github.com/messense/cargo-options/workflows/CI/badge.svg)](https://github.com/messense/cargo-options/actions?query=workflow%3ACI) [![Crates.io](https://img.shields.io/crates/v/cargo-options.svg)](https://crates.io/crates/cargo-options) [![docs.rs](https://docs.rs/cargo-options/badge.svg)](https://docs.rs/cargo-options/) Reusable common Cargo command line options. ## Installation Add it to your ``Cargo.toml``: ```bash cargo add cargo-options ``` ## License This work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file. cargo-options-0.6.0/examples/cargo-mimic.rs000064400000000000000000000012711046102023000167670ustar 00000000000000use cargo_options::{Build, Check, Clippy, Install, Metadata, Run, Rustc, Test}; use clap::Parser; #[derive(Debug, Parser)] #[command(name = "cargo-mimic", display_order = 1)] enum Opt { #[command(name = "build", aliases = &["b"] )] Build(Build), #[command(name = "clippy")] Clippy(Clippy), #[command(name = "check", aliases = &["c"])] Check(Check), #[command(name = "install")] Install(Install), #[command(name = "metadata")] Metadata(Metadata), #[command(name = "rustc")] Rustc(Rustc), #[command(name = "run", alias = "r")] Run(Run), #[command(name = "test", alias = "t")] Test(Test), } fn main() { let _opt = Opt::parse(); } cargo-options-0.6.0/src/build.rs000064400000000000000000000120101046102023000146410ustar 00000000000000use std::ops::{Deref, DerefMut}; use std::path::PathBuf; use std::process::Command; use clap::{ArgAction, Parser}; use crate::common::CommonOptions; /// Compile a local package and all of its dependencies #[derive(Clone, Debug, Default, Parser)] #[command( display_order = 1, after_help = "Run `cargo help build` for more detailed information." )] #[group(skip)] pub struct Build { #[command(flatten)] pub common: CommonOptions, /// Path to Cargo.toml #[arg(long, value_name = "PATH")] pub manifest_path: Option, /// Build artifacts in release mode, with optimizations #[arg(short = 'r', long)] pub release: bool, /// Ignore `rust-version` specification in packages #[arg(long)] pub ignore_rust_version: bool, /// Output build graph in JSON (unstable) #[arg(long)] pub unit_graph: bool, /// Package to build (see `cargo help pkgid`) #[arg( short = 'p', long = "package", value_name = "SPEC", action = ArgAction::Append, num_args=0..=1, )] pub packages: Vec, /// Build all packages in the workspace #[arg(long)] pub workspace: bool, /// Exclude packages from the build #[arg(long, value_name = "SPEC", action = ArgAction::Append)] pub exclude: Vec, /// Alias for workspace (deprecated) #[arg(long)] pub all: bool, /// Build only this package's library #[arg(long)] pub lib: bool, /// Build only the specified binary #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub bin: Vec, /// Build all binaries #[arg(long)] pub bins: bool, /// Build only the specified example #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub example: Vec, /// Build all examples #[arg(long)] pub examples: bool, /// Build only the specified test target #[arg(long, value_name = "NAME", action = ArgAction::Append)] pub test: Vec, /// Build all tests #[arg(long)] pub tests: bool, /// Build only the specified bench target #[arg(long, value_name = "NAME", action = ArgAction::Append)] pub bench: Vec, /// Build all benches #[arg(long)] pub benches: bool, /// Build all targets #[arg(long)] pub all_targets: bool, /// Copy final artifacts to this directory (unstable) #[arg(long, value_name = "PATH")] pub out_dir: Option, /// Output the build plan in JSON (unstable) #[arg(long)] pub build_plan: bool, /// Outputs a future incompatibility report at the end of the build (unstable) #[arg(long)] pub future_incompat_report: bool, } impl Build { /// Build a `cargo build` command pub fn command(&self) -> Command { let mut cmd = CommonOptions::cargo_command(); cmd.arg("build"); self.common.apply(&mut cmd); if let Some(path) = self.manifest_path.as_ref() { cmd.arg("--manifest-path").arg(path); } if self.release { cmd.arg("--release"); } if self.ignore_rust_version { cmd.arg("--ignore-rust-version"); } if self.unit_graph { cmd.arg("--unit-graph"); } for pkg in &self.packages { cmd.arg("--package").arg(pkg); } if self.workspace { cmd.arg("--workspace"); } for item in &self.exclude { cmd.arg("--exclude").arg(item); } if self.all { cmd.arg("--all"); } if self.lib { cmd.arg("--lib"); } for bin in &self.bin { cmd.arg("--bin").arg(bin); } if self.bins { cmd.arg("--bins"); } for example in &self.example { cmd.arg("--example").arg(example); } if self.examples { cmd.arg("--examples"); } for test in &self.test { cmd.arg("--test").arg(test); } if self.tests { cmd.arg("--tests"); } for bench in &self.bench { cmd.arg("--bench").arg(bench); } if self.benches { cmd.arg("--benches"); } if self.all_targets { cmd.arg("--all-targets"); } if let Some(dir) = self.out_dir.as_ref() { cmd.arg("--out-dir").arg(dir); } if self.build_plan { cmd.arg("--build-plan"); } if self.future_incompat_report { cmd.arg("--future-incompat-report"); } cmd } } impl Deref for Build { type Target = CommonOptions; fn deref(&self) -> &Self::Target { &self.common } } impl DerefMut for Build { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.common } } #[cfg(test)] mod test { use super::Build; use clap::CommandFactory; #[test] fn verify_cli() { ::command().debug_assert() } } cargo-options-0.6.0/src/check.rs000064400000000000000000000116521046102023000146320ustar 00000000000000use std::ops::{Deref, DerefMut}; use std::path::PathBuf; use std::process::Command; use clap::{ArgAction, Parser}; use crate::common::CommonOptions; /// `cargo check` options which are also a subset of `cargo clippy` #[derive(Clone, Debug, Default, Parser)] pub struct CheckOptions { /// Package to build (see `cargo help pkgid`) #[arg( short = 'p', long = "package", value_name = "SPEC", action = ArgAction::Append, num_args=0..=1, )] pub packages: Vec, /// Check all packages in the workspace #[arg(long)] pub workspace: bool, /// Exclude packages from the build #[arg(long, value_name = "SPEC", action = ArgAction::Append)] pub exclude: Vec, /// Alias for workspace (deprecated) #[arg(long)] pub all: bool, /// Check only this package's library #[arg(long)] pub lib: bool, /// Check only the specified binary #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub bin: Vec, /// Check all binaries #[arg(long)] pub bins: bool, /// Check only the specified example #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub example: Vec, /// Check all examples #[arg(long)] pub examples: bool, /// Check only the specified test target #[arg(long, value_name = "NAME", action = ArgAction::Append)] pub test: Vec, /// Check all tests #[arg(long)] pub tests: bool, /// Check only the specified bench target #[arg(long, value_name = "NAME", action = ArgAction::Append)] pub bench: Vec, /// Check all benches #[arg(long)] pub benches: bool, /// Check all targets #[arg(long)] pub all_targets: bool, /// Outputs a future incompatibility report at the end of the build (unstable) #[arg(long)] pub future_incompat_report: bool, } impl CheckOptions { pub fn apply(&self, cmd: &mut Command) { for pkg in &self.packages { cmd.arg("--package").arg(pkg); } if self.workspace { cmd.arg("--workspace"); } for item in &self.exclude { cmd.arg("--exclude").arg(item); } if self.all { cmd.arg("--all"); } if self.lib { cmd.arg("--lib"); } for bin in &self.bin { cmd.arg("--bin").arg(bin); } if self.bins { cmd.arg("--bins"); } for example in &self.example { cmd.arg("--example").arg(example); } if self.examples { cmd.arg("--examples"); } for test in &self.test { cmd.arg("--test").arg(test); } if self.tests { cmd.arg("--tests"); } for bench in &self.bench { cmd.arg("--bench").arg(bench); } if self.benches { cmd.arg("--benches"); } if self.all_targets { cmd.arg("--all-targets"); } if self.future_incompat_report { cmd.arg("--future-incompat-report"); } } } /// Check a local package and all of its dependencies for errors #[derive(Clone, Debug, Default, Parser)] #[command( display_order = 1, after_help = "Run `cargo help check` for more detailed information." )] #[group(skip)] pub struct Check { #[command(flatten)] pub common: CommonOptions, #[command(flatten)] pub check: CheckOptions, /// Path to Cargo.toml #[arg(long, value_name = "PATH")] pub manifest_path: Option, /// Build artifacts in release mode, with optimizations #[arg(short = 'r', long)] pub release: bool, /// Ignore `rust-version` specification in packages #[arg(long)] pub ignore_rust_version: bool, /// Output build graph in JSON (unstable) #[arg(long)] pub unit_graph: bool, } impl Check { /// Build a `cargo check` command pub fn command(&self) -> Command { let mut cmd = CommonOptions::cargo_command(); cmd.arg("check"); self.common.apply(&mut cmd); self.check.apply(&mut cmd); if let Some(path) = self.manifest_path.as_ref() { cmd.arg("--manifest-path").arg(path); } if self.release { cmd.arg("--release"); } if self.ignore_rust_version { cmd.arg("--ignore-rust-version"); } if self.unit_graph { cmd.arg("--unit-graph"); } cmd } } impl Deref for Check { type Target = CommonOptions; fn deref(&self) -> &Self::Target { &self.common } } impl DerefMut for Check { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.common } } #[cfg(test)] mod test { use super::Check; use clap::CommandFactory; #[test] fn verify_cli() { ::command().debug_assert() } } cargo-options-0.6.0/src/clippy.rs000064400000000000000000000050241046102023000150510ustar 00000000000000use std::ops::{Deref, DerefMut}; use std::path::PathBuf; use std::process::Command; use clap::Parser; use crate::check::CheckOptions; use crate::common::CommonOptions; /// Checks a package to catch common mistakes and improve your Rust code #[derive(Clone, Debug, Default, Parser)] #[command( display_order = 1, after_help = "Run `cargo help clippy` for more detailed information." )] #[group(skip)] pub struct Clippy { #[command(flatten)] pub common: CommonOptions, #[command(flatten)] pub check: CheckOptions, /// Path to Cargo.toml #[arg(long, value_name = "PATH")] pub manifest_path: Option, /// Build artifacts in release mode, with optimizations #[arg(short = 'r', long)] pub release: bool, /// Ignore `rust-version` specification in packages #[arg(long)] pub ignore_rust_version: bool, /// Output build graph in JSON (unstable) #[arg(long)] pub unit_graph: bool, /// Ignore dependencies, run only on crate #[arg(long)] pub no_deps: bool, /// Automatically apply lint suggestions (see `cargo help clippy`) #[arg(long)] pub fix: bool, /// Arguments passed to rustc. #[arg(value_name = "args", trailing_var_arg = true, num_args = 0..)] pub args: Vec, } impl Clippy { /// Build a `cargo clippy` command pub fn command(&self) -> Command { let mut cmd = CommonOptions::cargo_command(); cmd.arg("clippy"); self.common.apply(&mut cmd); self.check.apply(&mut cmd); if let Some(path) = self.manifest_path.as_ref() { cmd.arg("--manifest-path").arg(path); } if self.release { cmd.arg("--release"); } if self.ignore_rust_version { cmd.arg("--ignore-rust-version"); } if self.unit_graph { cmd.arg("--unit-graph"); } if self.no_deps { cmd.arg("--no-deps"); } if self.fix { cmd.arg("--fix"); } if !self.args.is_empty() { cmd.arg("--"); cmd.args(&self.args); } cmd } } impl Deref for Clippy { type Target = CommonOptions; fn deref(&self) -> &Self::Target { &self.common } } impl DerefMut for Clippy { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.common } } #[cfg(test)] mod test { use super::Clippy; use clap::CommandFactory; #[test] fn verify_cli() { ::command().debug_assert() } } cargo-options-0.6.0/src/common.rs000064400000000000000000000114621046102023000150440ustar 00000000000000use std::path::PathBuf; use std::process::Command; use clap::{ArgAction, Parser}; /// common cargo options #[derive(Clone, Debug, Default, Parser)] pub struct CommonOptions { /// Do not print cargo log messages #[arg(short = 'q', long)] pub quiet: bool, /// Number of parallel jobs, defaults to # of CPUs #[arg(short = 'j', long, value_name = "N")] pub jobs: Option, /// Do not abort the build as soon as there is an error (unstable) #[arg(long)] pub keep_going: bool, /// Build artifacts with the specified Cargo profile #[arg(long, value_name = "PROFILE-NAME")] pub profile: Option, /// Space or comma separated list of features to activate #[arg(short = 'F', long, action = ArgAction::Append)] pub features: Vec, /// Activate all available features #[arg(long)] pub all_features: bool, /// Do not activate the `default` feature #[arg(long)] pub no_default_features: bool, /// Build for the target triple #[arg( long, value_name = "TRIPLE", env = "CARGO_BUILD_TARGET", action = ArgAction::Append )] pub target: Vec, /// Directory for all generated artifacts #[arg(long, value_name = "DIRECTORY")] pub target_dir: Option, /// Error format #[arg(long, value_name = "FMT", action = ArgAction::Append)] pub message_format: Vec, /// Use verbose output (-vv very verbose/build.rs output) #[arg(short = 'v', long, action = ArgAction::Count)] pub verbose: u8, /// Coloring: auto, always, never #[arg(long, value_name = "WHEN")] pub color: Option, /// Require Cargo.lock and cache are up to date #[arg(long)] pub frozen: bool, /// Require Cargo.lock is up to date #[arg(long)] pub locked: bool, /// Run without accessing the network #[arg(long)] pub offline: bool, /// Override a configuration value (unstable) #[arg(long, value_name = "KEY=VALUE", action = ArgAction::Append)] pub config: Vec, /// Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details #[arg(short = 'Z', value_name = "FLAG", action = ArgAction::Append)] pub unstable_flags: Vec, /// Timing output formats (unstable) (comma separated): html, json #[arg( long, value_name = "FMTS", num_args = 0.., value_delimiter = ',', require_equals = true )] pub timings: Option>, } impl CommonOptions { /// Apply options to `Command` pub fn apply(&self, cmd: &mut Command) { if self.quiet { cmd.arg("--quiet"); } if let Some(jobs) = self.jobs { cmd.arg("--jobs").arg(jobs.to_string()); } if self.keep_going { cmd.arg("--keep-going"); } if let Some(profile) = self.profile.as_ref() { cmd.arg("--profile").arg(profile); } for feature in &self.features { cmd.arg("--features").arg(feature); } if self.all_features { cmd.arg("--all-features"); } if self.no_default_features { cmd.arg("--no-default-features"); } // Support . syntax // For example: x86_64-unknown-linux-gnu.2.17 let rust_targets = self .target .iter() .map(|target| target.split_once('.').map(|(t, _)| t).unwrap_or(target)) .collect::>(); rust_targets.iter().for_each(|target| { cmd.arg("--target").arg(target); }); if let Some(dir) = self.target_dir.as_ref() { cmd.arg("--target-dir").arg(dir); } for fmt in &self.message_format { cmd.arg("--message-format").arg(fmt); } if self.verbose > 0 { cmd.arg(format!("-{}", "v".repeat(self.verbose.into()))); } if let Some(color) = self.color.as_ref() { cmd.arg("--color").arg(color); } if self.frozen { cmd.arg("--frozen"); } if self.locked { cmd.arg("--locked"); } if self.offline { cmd.arg("--offline"); } for config in &self.config { cmd.arg("--config").arg(config); } for flag in &self.unstable_flags { cmd.arg("-Z").arg(flag); } if let Some(timings) = &self.timings { if timings.is_empty() { cmd.arg("--timings"); } else { let timings: Vec<_> = timings.iter().map(|x| x.as_str()).collect(); cmd.arg(format!("--timings={}", timings.join(","))); } } } pub(crate) fn cargo_command() -> Command { Command::new("cargo") } } cargo-options-0.6.0/src/install.rs000064400000000000000000000115511046102023000152210ustar 00000000000000use std::ops::{Deref, DerefMut}; use std::path::PathBuf; use std::process::Command; use clap::{ArgAction, Parser}; use crate::common::CommonOptions; /// Install a Rust binary. Default location is $HOME/.cargo/bin #[derive(Clone, Debug, Default, Parser)] #[command( display_order = 1, after_help = "Run `cargo help install` for more detailed information." )] #[group(skip)] pub struct Install { #[command(flatten)] pub common: CommonOptions, /// Specify a version to install #[arg(long, value_name = "VERSION", alias = "vers", requires = "crates")] pub version: Option, /// Git URL to install the specified crate from #[arg(long, value_name = "URL", conflicts_with_all = ["path", "index", "registry"])] pub git: Option, /// Branch to use when installing from git #[arg(long, value_name = "BRANCH", requires = "git")] pub branch: Option, /// Tag to use when installing from git #[arg(long, value_name = "TAG", requires = "git")] pub tag: Option, /// Specific commit to use when installing from git #[arg(long, value_name = "SHA", requires = "git")] pub rev: Option, /// Filesystem path to local crate to install #[arg(long, value_name = "PATH", conflicts_with_all = ["git", "index", "registry"])] pub path: Option, /// list all installed packages and their versions #[arg(long)] pub list: bool, /// Force overwriting existing crates or binaries #[arg(short, long)] pub force: bool, /// Do not save tracking information #[arg(long)] pub no_track: bool, /// Build in debug mode (with the 'dev' profile) instead of release mode #[arg(long)] pub debug: bool, /// Directory to install packages into #[arg(long, value_name = "DIR")] pub root: Option, /// Registry index to install from #[arg(long, value_name = "INDEX", conflicts_with_all = ["git", "path", "registry"], requires = "crates")] pub index: Option, /// Registry to use #[arg(long, value_name = "REGISTRY", conflicts_with_all = ["git", "path", "index"], requires = "crates")] pub registry: Option, /// Install only the specified binary #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub bin: Vec, /// Install all binaries #[arg(long)] pub bins: bool, /// Install only the specified example #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub example: Vec, /// Install all examples #[arg(long)] pub examples: bool, #[arg(value_name = "crate", action = ArgAction::Append, num_args = 0..)] pub crates: Vec, } impl Install { /// Build a `cargo install` command pub fn command(&self) -> Command { let mut cmd = CommonOptions::cargo_command(); cmd.arg("install"); self.common.apply(&mut cmd); if let Some(version) = self.version.as_ref() { cmd.arg("--version").arg(version); } if let Some(git) = self.git.as_ref() { cmd.arg("--git").arg(git); } if let Some(branch) = self.branch.as_ref() { cmd.arg("--branch").arg(branch); } if let Some(tag) = self.tag.as_ref() { cmd.arg("--tag").arg(tag); } if let Some(rev) = self.rev.as_ref() { cmd.arg("--rev").arg(rev); } if let Some(path) = self.path.as_ref() { cmd.arg("--path").arg(path); } if self.list { cmd.arg("--list"); } if self.force { cmd.arg("--force"); } if self.no_track { cmd.arg("--no-track"); } if self.debug { cmd.arg("--debug"); } if let Some(root) = self.root.as_ref() { cmd.arg("--root").arg(root); } if let Some(index) = self.index.as_ref() { cmd.arg("--index").arg(index); } if let Some(registry) = self.registry.as_ref() { cmd.arg("--registry").arg(registry); } for bin in &self.bin { cmd.arg("--bin").arg(bin); } if self.bins { cmd.arg("--bins"); } for example in &self.example { cmd.arg("--example").arg(example); } if self.examples { cmd.arg("--examples"); } cmd.args(&self.crates); cmd } } impl Deref for Install { type Target = CommonOptions; fn deref(&self) -> &Self::Target { &self.common } } impl DerefMut for Install { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.common } } #[cfg(test)] mod test { use super::Install; use clap::CommandFactory; #[test] fn verify_cli() { ::command().debug_assert() } } cargo-options-0.6.0/src/lib.rs000064400000000000000000000005771046102023000143270ustar 00000000000000mod build; mod check; mod clippy; mod common; mod install; mod metadata; mod run; mod rustc; mod test; // Specify crate to satisfy naming overlap w/ rustc clippy pub use crate::clippy::Clippy; pub use build::Build; pub use check::Check; pub use common::CommonOptions; pub use install::Install; pub use metadata::Metadata; pub use run::Run; pub use rustc::Rustc; pub use test::Test; cargo-options-0.6.0/src/metadata.rs000064400000000000000000000077021046102023000153360ustar 00000000000000use std::path::PathBuf; use std::process::Command; use clap::{ArgAction, Parser}; use crate::CommonOptions; /// Output the resolved dependencies of a package, /// the concrete used versions including overrides, /// in machine-readable format #[derive(Clone, Debug, Default, Parser)] #[command( display_order = 1, after_help = "Run `cargo help metadata` for more detailed information." )] #[group(skip)] pub struct Metadata { /// Do not print cargo log messages #[arg(short = 'q', long)] pub quiet: bool, /// Space or comma separated list of features to activate #[arg(short = 'F', long, action = ArgAction::Append)] pub features: Vec, /// Activate all available features #[arg(long)] pub all_features: bool, /// Do not activate the `default` feature #[arg(long)] pub no_default_features: bool, /// Use verbose output (-vv very verbose/build.rs output) #[arg(short = 'v', long, action = ArgAction::Count)] pub verbose: u8, /// Only include resolve dependencies matching the given target-triple #[arg(long, value_name = "TRIPLE", action = ArgAction::Append)] pub filter_platform: Vec, /// Output information only about the workspace members /// and don't fetch dependencies #[arg(long)] pub no_deps: bool, /// Path to Cargo.toml #[arg(long, value_name = "PATH")] pub manifest_path: Option, /// Format version #[arg(long, value_name = "VERSION", value_parser = ["1"])] pub format_version: Option, /// Coloring: auto, always, never #[arg(long, value_name = "WHEN")] pub color: Option, /// Require Cargo.lock and cache are up to date #[arg(long)] pub frozen: bool, /// Require Cargo.lock is up to date #[arg(long)] pub locked: bool, /// Run without accessing the network #[arg(long)] pub offline: bool, /// Override a configuration value (unstable) #[arg(long, value_name = "KEY=VALUE", action = ArgAction::Append)] pub config: Vec, /// Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details #[arg(short = 'Z', value_name = "FLAG", action = ArgAction::Append)] pub unstable_flags: Vec, } impl Metadata { /// Build a `cargo metadata` command pub fn command(&self) -> Command { let mut cmd = CommonOptions::cargo_command(); cmd.arg("metadata"); if self.quiet { cmd.arg("--quiet"); } if self.verbose > 0 { cmd.arg(format!("-{}", "v".repeat(self.verbose.into()))); } for feature in &self.features { cmd.arg("--features").arg(feature); } if self.all_features { cmd.arg("--all-features"); } if self.no_default_features { cmd.arg("--no-default-features"); } for platform in &self.filter_platform { cmd.arg("--filter-platform").arg(platform); } if self.no_deps { cmd.arg("--no-deps"); } if let Some(path) = self.manifest_path.as_ref() { cmd.arg("--manifest-path").arg(path); } if let Some(format_version) = self.format_version.as_ref() { cmd.arg("--format-version").arg(format_version); } if let Some(color) = self.color.as_ref() { cmd.arg("--color").arg(color); } if self.frozen { cmd.arg("--frozen"); } if self.locked { cmd.arg("--locked"); } if self.offline { cmd.arg("--offline"); } for config in &self.config { cmd.arg("--config").arg(config); } for flag in &self.unstable_flags { cmd.arg("-Z").arg(flag); } cmd } } #[cfg(test)] mod test { use super::Metadata; use clap::CommandFactory; #[test] fn verify_cli() { ::command().debug_assert() } } cargo-options-0.6.0/src/run.rs000064400000000000000000000055051046102023000143610ustar 00000000000000use std::ops::{Deref, DerefMut}; use std::path::PathBuf; use std::process::Command; use clap::{ArgAction, Parser}; use crate::common::CommonOptions; /// Run a binary or example of the local package #[derive(Clone, Debug, Default, Parser)] #[command( display_order = 1, after_help = "Run `cargo help run` for more detailed information." )] #[group(skip)] pub struct Run { #[command(flatten)] pub common: CommonOptions, /// Path to Cargo.toml #[arg(long, value_name = "PATH")] pub manifest_path: Option, /// Build artifacts in release mode, with optimizations #[arg(short = 'r', long)] pub release: bool, /// Ignore `rust-version` specification in packages #[arg(long)] pub ignore_rust_version: bool, /// Output build graph in JSON (unstable) #[arg(long)] pub unit_graph: bool, /// Package to run (see `cargo help pkgid`) #[arg( short = 'p', long = "package", value_name = "SPEC", action = ArgAction::Append, num_args=0..=1, )] pub packages: Vec, /// Run the specified binary #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub bin: Vec, /// Run the specified example #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub example: Vec, /// Arguments for the binary to run #[arg(value_name = "args", trailing_var_arg = true, num_args = 0..)] pub args: Vec, } impl Run { /// Build a `cargo run` command pub fn command(&self) -> Command { let mut cmd = CommonOptions::cargo_command(); cmd.arg("run"); self.common.apply(&mut cmd); if let Some(path) = self.manifest_path.as_ref() { cmd.arg("--manifest-path").arg(path); } if self.release { cmd.arg("--release"); } if self.ignore_rust_version { cmd.arg("--ignore-rust-version"); } if self.unit_graph { cmd.arg("--unit-graph"); } for pkg in &self.packages { cmd.arg("--package").arg(pkg); } for bin in &self.bin { cmd.arg("--bin").arg(bin); } for example in &self.example { cmd.arg("--example").arg(example); } if !self.args.is_empty() { cmd.arg("--"); cmd.args(&self.args); } cmd } } impl Deref for Run { type Target = CommonOptions; fn deref(&self) -> &Self::Target { &self.common } } impl DerefMut for Run { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.common } } #[cfg(test)] mod test { use super::Run; use clap::CommandFactory; #[test] fn verify_cli() { ::command().debug_assert() } } cargo-options-0.6.0/src/rustc.rs000064400000000000000000000115121046102023000147100ustar 00000000000000use std::ops::{Deref, DerefMut}; use std::path::PathBuf; use std::process::Command; use clap::{ArgAction, Parser}; use crate::common::CommonOptions; /// Compile a package, and pass extra options to the compiler #[derive(Clone, Debug, Default, Parser)] #[command( display_order = 1, after_help = "Run `cargo help rustc` for more detailed information." )] #[group(skip)] pub struct Rustc { #[command(flatten)] pub common: CommonOptions, /// Path to Cargo.toml #[arg(long, value_name = "PATH")] pub manifest_path: Option, /// Build artifacts in release mode, with optimizations #[arg(short = 'r', long)] pub release: bool, /// Ignore `rust-version` specification in packages #[arg(long)] pub ignore_rust_version: bool, /// Output build graph in JSON (unstable) #[arg(long)] pub unit_graph: bool, /// Package to build (see `cargo help pkgid`) #[arg( short = 'p', long = "package", value_name = "SPEC", action = ArgAction::Append, num_args=0..=1, )] pub packages: Vec, /// Build only this package's library #[arg(long)] pub lib: bool, /// Build only the specified binary #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub bin: Vec, /// Build all binaries #[arg(long)] pub bins: bool, /// Build only the specified example #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub example: Vec, /// Build all examples #[arg(long)] pub examples: bool, /// Build only the specified test target #[arg(long, value_name = "NAME", action = ArgAction::Append)] pub test: Vec, /// Build all tests #[arg(long)] pub tests: bool, /// Build only the specified bench target #[arg(long, value_name = "NAME", action = ArgAction::Append)] pub bench: Vec, /// Build all benches #[arg(long)] pub benches: bool, /// Build all targets #[arg(long)] pub all_targets: bool, /// Output compiler information without compiling #[arg(long, value_name = "INFO")] pub print: Option, /// Comma separated list of types of crates for the compiler to emit #[arg(long, value_name = "CRATE-TYPE", action = ArgAction::Append)] pub crate_type: Vec, /// Outputs a future incompatibility report at the end of the build (unstable) #[arg(long)] pub future_incompat_report: bool, /// Rustc flags #[arg(value_name = "args", trailing_var_arg = true, num_args = 0..)] pub args: Vec, } impl Rustc { /// Build a `cargo rustc` command pub fn command(&self) -> Command { let mut cmd = CommonOptions::cargo_command(); cmd.arg("rustc"); self.common.apply(&mut cmd); if let Some(path) = self.manifest_path.as_ref() { cmd.arg("--manifest-path").arg(path); } if self.release { cmd.arg("--release"); } if self.ignore_rust_version { cmd.arg("--ignore-rust-version"); } if self.unit_graph { cmd.arg("--unit-graph"); } for pkg in &self.packages { cmd.arg("--package").arg(pkg); } if self.lib { cmd.arg("--lib"); } for bin in &self.bin { cmd.arg("--bin").arg(bin); } if self.bins { cmd.arg("--bins"); } for example in &self.example { cmd.arg("--example").arg(example); } if self.examples { cmd.arg("--examples"); } for test in &self.test { cmd.arg("--test").arg(test); } if self.tests { cmd.arg("--tests"); } for bench in &self.bench { cmd.arg("--bench").arg(bench); } if self.benches { cmd.arg("--benches"); } if self.all_targets { cmd.arg("--all-targets"); } if let Some(print) = self.print.as_ref() { cmd.arg("--print").arg(print); } if !self.crate_type.is_empty() { cmd.arg("--crate-type").arg(self.crate_type.join(",")); } if self.future_incompat_report { cmd.arg("--future-incompat-report"); } if !self.args.is_empty() { cmd.arg("--").args(&self.args); } cmd } } impl Deref for Rustc { type Target = CommonOptions; fn deref(&self) -> &Self::Target { &self.common } } impl DerefMut for Rustc { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.common } } #[cfg(test)] mod test { use super::Rustc; use clap::CommandFactory; #[test] fn verify_cli() { ::command().debug_assert() } } cargo-options-0.6.0/src/test.rs000064400000000000000000000131511046102023000145300ustar 00000000000000use std::ops::{Deref, DerefMut}; use std::path::PathBuf; use std::process::Command; use clap::{ArgAction, Parser}; use crate::common::CommonOptions; /// Execute all unit and integration tests and build examples of a local package #[derive(Clone, Debug, Default, Parser)] #[command( display_order = 1, after_help = "Run `cargo help test` for more detailed information.\nRun `cargo test -- --help` for test binary options." )] #[group(skip)] pub struct Test { #[command(flatten)] pub common: CommonOptions, /// Path to Cargo.toml #[arg(long, value_name = "PATH")] pub manifest_path: Option, /// Build artifacts in release mode, with optimizations #[arg(short = 'r', long)] pub release: bool, /// Ignore `rust-version` specification in packages #[arg(long)] pub ignore_rust_version: bool, /// Output build graph in JSON (unstable) #[arg(long)] pub unit_graph: bool, /// Package to build (see `cargo help pkgid`) #[arg( short = 'p', long = "package", value_name = "SPEC", action = ArgAction::Append, num_args=0..=1, )] pub packages: Vec, /// Test all packages in the workspace #[arg(long)] pub workspace: bool, /// Exclude packages from the build #[arg(long, value_name = "SPEC", action = ArgAction::Append)] pub exclude: Vec, /// Alias for workspace (deprecated) #[arg(long)] pub all: bool, /// Test only this package's library #[arg(long)] pub lib: bool, /// Test only the specified binary #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub bin: Vec, /// Test all binaries #[arg(long)] pub bins: bool, /// Test only the specified example #[arg(long, value_name = "NAME", action = ArgAction::Append, num_args=0..=1)] pub example: Vec, /// Test all examples #[arg(long)] pub examples: bool, /// Test only the specified test target #[arg(long, value_name = "NAME", action = ArgAction::Append)] pub test: Vec, /// Test all tests #[arg(long)] pub tests: bool, /// Test only the specified bench target #[arg(long, value_name = "NAME", action = ArgAction::Append)] pub bench: Vec, /// Test all benches #[arg(long)] pub benches: bool, /// Test all targets #[arg(long)] pub all_targets: bool, /// Test only this library's documentation #[arg(long)] pub doc: bool, /// Compile, but don't run tests #[arg(long)] pub no_run: bool, /// Run all tests regardless of failure #[arg(long)] pub no_fail_fast: bool, /// Outputs a future incompatibility report at the end of the build (unstable) #[arg(long)] pub future_incompat_report: bool, /// If specified, only run tests containing this string in their names #[arg(value_name = "TESTNAME")] pub test_name: Option, /// Arguments for the test binary #[arg(value_name = "args", trailing_var_arg = true, num_args = 0..)] pub args: Vec, } impl Test { /// Build a `cargo test` command pub fn command(&self) -> Command { let mut cmd = CommonOptions::cargo_command(); cmd.arg("test"); self.common.apply(&mut cmd); if let Some(path) = self.manifest_path.as_ref() { cmd.arg("--manifest-path").arg(path); } if self.release { cmd.arg("--release"); } if self.ignore_rust_version { cmd.arg("--ignore-rust-version"); } if self.unit_graph { cmd.arg("--unit-graph"); } for pkg in &self.packages { cmd.arg("--package").arg(pkg); } if self.workspace { cmd.arg("--workspace"); } for item in &self.exclude { cmd.arg("--exclude").arg(item); } if self.all { cmd.arg("--all"); } if self.lib { cmd.arg("--lib"); } for bin in &self.bin { cmd.arg("--bin").arg(bin); } if self.bins { cmd.arg("--bins"); } for example in &self.example { cmd.arg("--example").arg(example); } if self.examples { cmd.arg("--examples"); } for test in &self.test { cmd.arg("--test").arg(test); } if self.tests { cmd.arg("--tests"); } for bench in &self.bench { cmd.arg("--bench").arg(bench); } if self.benches { cmd.arg("--benches"); } if self.all_targets { cmd.arg("--all-targets"); } if self.doc { cmd.arg("--doc"); } if self.no_run { cmd.arg("--no-run"); } if self.no_fail_fast { cmd.arg("--no-fail-fast"); } if self.future_incompat_report { cmd.arg("--future-incompat-report"); } if let Some(test_name) = self.test_name.as_ref() { cmd.arg(test_name); } if !self.args.is_empty() { cmd.arg("--"); cmd.args(&self.args); } cmd } } impl Deref for Test { type Target = CommonOptions; fn deref(&self) -> &Self::Target { &self.common } } impl DerefMut for Test { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.common } } #[cfg(test)] mod tests { use super::Test; use clap::CommandFactory; #[test] fn verify_cli() { ::command().debug_assert() } } cargo-options-0.6.0/tests/cli_tests.rs000064400000000000000000000002441046102023000161140ustar 00000000000000#[test] fn cli_tests() { let t = trycmd::TestCases::new(); t.register_bins(trycmd::cargo::compile_examples([]).unwrap()); t.case("tests/cmd/*.toml"); } cargo-options-0.6.0/tests/cmd/build.stderr000064400000000000000000000000001046102023000166320ustar 00000000000000cargo-options-0.6.0/tests/cmd/build.stdout000064400000000000000000000057341046102023000166740ustar 00000000000000Compile a local package and all of its dependencies Usage: cargo-mimic[EXE] build [OPTIONS] Options: -q, --quiet Do not print cargo log messages -j, --jobs Number of parallel jobs, defaults to # of CPUs --keep-going Do not abort the build as soon as there is an error (unstable) --profile Build artifacts with the specified Cargo profile -F, --features Space or comma separated list of features to activate --all-features Activate all available features --no-default-features Do not activate the `default` feature --target Build for the target triple [env: CARGO_BUILD_TARGET=] --target-dir Directory for all generated artifacts --message-format Error format -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --color Coloring: auto, always, never --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date --offline Run without accessing the network --config Override a configuration value (unstable) -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details --timings[=...] Timing output formats (unstable) (comma separated): html, json --manifest-path Path to Cargo.toml -r, --release Build artifacts in release mode, with optimizations --ignore-rust-version Ignore `rust-version` specification in packages --unit-graph Output build graph in JSON (unstable) -p, --package [] Package to build (see `cargo help pkgid`) --workspace Build all packages in the workspace --exclude Exclude packages from the build --all Alias for workspace (deprecated) --lib Build only this package's library --bin [] Build only the specified binary --bins Build all binaries --example [] Build only the specified example --examples Build all examples --test Build only the specified test target --tests Build all tests --bench Build only the specified bench target --benches Build all benches --all-targets Build all targets --out-dir Copy final artifacts to this directory (unstable) --build-plan Output the build plan in JSON (unstable) --future-incompat-report Outputs a future incompatibility report at the end of the build (unstable) -h, --help Print help Run `cargo help build` for more detailed information. cargo-options-0.6.0/tests/cmd/build.toml000064400000000000000000000000571046102023000163160ustar 00000000000000bin.name = "cargo-mimic" args = "build --help" cargo-options-0.6.0/tests/cmd/check.stderr000064400000000000000000000000001046102023000166100ustar 00000000000000cargo-options-0.6.0/tests/cmd/check.stdout000064400000000000000000000055121046102023000166440ustar 00000000000000Check a local package and all of its dependencies for errors Usage: cargo-mimic[EXE] check [OPTIONS] Options: -q, --quiet Do not print cargo log messages -j, --jobs Number of parallel jobs, defaults to # of CPUs --keep-going Do not abort the build as soon as there is an error (unstable) --profile Build artifacts with the specified Cargo profile -F, --features Space or comma separated list of features to activate --all-features Activate all available features --no-default-features Do not activate the `default` feature --target Build for the target triple [env: CARGO_BUILD_TARGET=] --target-dir Directory for all generated artifacts --message-format Error format -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --color Coloring: auto, always, never --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date --offline Run without accessing the network --config Override a configuration value (unstable) -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details --timings[=...] Timing output formats (unstable) (comma separated): html, json -p, --package [] Package to build (see `cargo help pkgid`) --workspace Check all packages in the workspace --exclude Exclude packages from the build --all Alias for workspace (deprecated) --lib Check only this package's library --bin [] Check only the specified binary --bins Check all binaries --example [] Check only the specified example --examples Check all examples --test Check only the specified test target --tests Check all tests --bench Check only the specified bench target --benches Check all benches --all-targets Check all targets --future-incompat-report Outputs a future incompatibility report at the end of the build (unstable) --manifest-path Path to Cargo.toml -r, --release Build artifacts in release mode, with optimizations --ignore-rust-version Ignore `rust-version` specification in packages --unit-graph Output build graph in JSON (unstable) -h, --help Print help Run `cargo help check` for more detailed information. cargo-options-0.6.0/tests/cmd/check.toml000064400000000000000000000000571046102023000162740ustar 00000000000000bin.name = "cargo-mimic" args = "check --help" cargo-options-0.6.0/tests/cmd/clippy.stderr000064400000000000000000000000001046102023000170330ustar 00000000000000cargo-options-0.6.0/tests/cmd/clippy.stdout000064400000000000000000000060671046102023000170750ustar 00000000000000Checks a package to catch common mistakes and improve your Rust code Usage: cargo-mimic[EXE] clippy [OPTIONS] [args]... Arguments: [args]... Arguments passed to rustc Options: -q, --quiet Do not print cargo log messages -j, --jobs Number of parallel jobs, defaults to # of CPUs --keep-going Do not abort the build as soon as there is an error (unstable) --profile Build artifacts with the specified Cargo profile -F, --features Space or comma separated list of features to activate --all-features Activate all available features --no-default-features Do not activate the `default` feature --target Build for the target triple [env: CARGO_BUILD_TARGET=] --target-dir Directory for all generated artifacts --message-format Error format -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --color Coloring: auto, always, never --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date --offline Run without accessing the network --config Override a configuration value (unstable) -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details --timings[=...] Timing output formats (unstable) (comma separated): html, json -p, --package [] Package to build (see `cargo help pkgid`) --workspace Check all packages in the workspace --exclude Exclude packages from the build --all Alias for workspace (deprecated) --lib Check only this package's library --bin [] Check only the specified binary --bins Check all binaries --example [] Check only the specified example --examples Check all examples --test Check only the specified test target --tests Check all tests --bench Check only the specified bench target --benches Check all benches --all-targets Check all targets --future-incompat-report Outputs a future incompatibility report at the end of the build (unstable) --manifest-path Path to Cargo.toml -r, --release Build artifacts in release mode, with optimizations --ignore-rust-version Ignore `rust-version` specification in packages --unit-graph Output build graph in JSON (unstable) --no-deps Ignore dependencies, run only on crate --fix Automatically apply lint suggestions (see `cargo help clippy`) -h, --help Print help Run `cargo help clippy` for more detailed information. cargo-options-0.6.0/tests/cmd/clippy.toml000064400000000000000000000000601046102023000165110ustar 00000000000000bin.name = "cargo-mimic" args = "clippy --help" cargo-options-0.6.0/tests/cmd/install.stderr000064400000000000000000000000001046102023000172010ustar 00000000000000cargo-options-0.6.0/tests/cmd/install.stdout000064400000000000000000000054061046102023000172370ustar 00000000000000Install a Rust binary. Default location is $HOME/.cargo/bin Usage: cargo-mimic[EXE] install [OPTIONS] [crate]... Arguments: [crate]... Options: -q, --quiet Do not print cargo log messages -j, --jobs Number of parallel jobs, defaults to # of CPUs --keep-going Do not abort the build as soon as there is an error (unstable) --profile Build artifacts with the specified Cargo profile -F, --features Space or comma separated list of features to activate --all-features Activate all available features --no-default-features Do not activate the `default` feature --target Build for the target triple [env: CARGO_BUILD_TARGET=] --target-dir Directory for all generated artifacts --message-format Error format -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --color Coloring: auto, always, never --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date --offline Run without accessing the network --config Override a configuration value (unstable) -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details --timings[=...] Timing output formats (unstable) (comma separated): html, json --version Specify a version to install --git Git URL to install the specified crate from --branch Branch to use when installing from git --tag Tag to use when installing from git --rev Specific commit to use when installing from git --path Filesystem path to local crate to install --list list all installed packages and their versions -f, --force Force overwriting existing crates or binaries --no-track Do not save tracking information --debug Build in debug mode (with the 'dev' profile) instead of release mode --root Directory to install packages into --index Registry index to install from --registry Registry to use --bin [] Install only the specified binary --bins Install all binaries --example [] Install only the specified example --examples Install all examples -h, --help Print help Run `cargo help install` for more detailed information. cargo-options-0.6.0/tests/cmd/install.toml000064400000000000000000000000611046102023000166600ustar 00000000000000bin.name = "cargo-mimic" args = "install --help" cargo-options-0.6.0/tests/cmd/metadata.stderr000064400000000000000000000000001046102023000173130ustar 00000000000000cargo-options-0.6.0/tests/cmd/metadata.stdout000064400000000000000000000027651046102023000173560ustar 00000000000000Output the resolved dependencies of a package, the concrete used versions including overrides, in machine-readable format Usage: cargo-mimic[EXE] metadata [OPTIONS] Options: -q, --quiet Do not print cargo log messages -F, --features Space or comma separated list of features to activate --all-features Activate all available features --no-default-features Do not activate the `default` feature -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --filter-platform Only include resolve dependencies matching the given target-triple --no-deps Output information only about the workspace members and don't fetch dependencies --manifest-path Path to Cargo.toml --format-version Format version [possible values: 1] --color Coloring: auto, always, never --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date --offline Run without accessing the network --config Override a configuration value (unstable) -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details -h, --help Print help Run `cargo help metadata` for more detailed information. cargo-options-0.6.0/tests/cmd/metadata.toml000064400000000000000000000000621046102023000167730ustar 00000000000000bin.name = "cargo-mimic" args = "metadata --help" cargo-options-0.6.0/tests/cmd/run.stderr000064400000000000000000000000001046102023000163370ustar 00000000000000cargo-options-0.6.0/tests/cmd/run.stdout000064400000000000000000000041221046102023000163670ustar 00000000000000Run a binary or example of the local package Usage: cargo-mimic[EXE] run [OPTIONS] [args]... Arguments: [args]... Arguments for the binary to run Options: -q, --quiet Do not print cargo log messages -j, --jobs Number of parallel jobs, defaults to # of CPUs --keep-going Do not abort the build as soon as there is an error (unstable) --profile Build artifacts with the specified Cargo profile -F, --features Space or comma separated list of features to activate --all-features Activate all available features --no-default-features Do not activate the `default` feature --target Build for the target triple [env: CARGO_BUILD_TARGET=] --target-dir Directory for all generated artifacts --message-format Error format -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --color Coloring: auto, always, never --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date --offline Run without accessing the network --config Override a configuration value (unstable) -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details --timings[=...] Timing output formats (unstable) (comma separated): html, json --manifest-path Path to Cargo.toml -r, --release Build artifacts in release mode, with optimizations --ignore-rust-version Ignore `rust-version` specification in packages --unit-graph Output build graph in JSON (unstable) -p, --package [] Package to run (see `cargo help pkgid`) --bin [] Run the specified binary --example [] Run the specified example -h, --help Print help Run `cargo help run` for more detailed information. cargo-options-0.6.0/tests/cmd/run.toml000064400000000000000000000000551046102023000160210ustar 00000000000000bin.name = "cargo-mimic" args = "run --help" cargo-options-0.6.0/tests/cmd/rustc.stderr000064400000000000000000000000001046102023000166730ustar 00000000000000cargo-options-0.6.0/tests/cmd/rustc.stdout000064400000000000000000000056071046102023000167340ustar 00000000000000Compile a package, and pass extra options to the compiler Usage: cargo-mimic[EXE] rustc [OPTIONS] [args]... Arguments: [args]... Rustc flags Options: -q, --quiet Do not print cargo log messages -j, --jobs Number of parallel jobs, defaults to # of CPUs --keep-going Do not abort the build as soon as there is an error (unstable) --profile Build artifacts with the specified Cargo profile -F, --features Space or comma separated list of features to activate --all-features Activate all available features --no-default-features Do not activate the `default` feature --target Build for the target triple [env: CARGO_BUILD_TARGET=] --target-dir Directory for all generated artifacts --message-format Error format -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --color Coloring: auto, always, never --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date --offline Run without accessing the network --config Override a configuration value (unstable) -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details --timings[=...] Timing output formats (unstable) (comma separated): html, json --manifest-path Path to Cargo.toml -r, --release Build artifacts in release mode, with optimizations --ignore-rust-version Ignore `rust-version` specification in packages --unit-graph Output build graph in JSON (unstable) -p, --package [] Package to build (see `cargo help pkgid`) --lib Build only this package's library --bin [] Build only the specified binary --bins Build all binaries --example [] Build only the specified example --examples Build all examples --test Build only the specified test target --tests Build all tests --bench Build only the specified bench target --benches Build all benches --all-targets Build all targets --print Output compiler information without compiling --crate-type Comma separated list of types of crates for the compiler to emit --future-incompat-report Outputs a future incompatibility report at the end of the build (unstable) -h, --help Print help Run `cargo help rustc` for more detailed information. cargo-options-0.6.0/tests/cmd/rustc.toml000064400000000000000000000000571046102023000163570ustar 00000000000000bin.name = "cargo-mimic" args = "rustc --help" cargo-options-0.6.0/tests/cmd/test.stderr000064400000000000000000000000001046102023000165120ustar 00000000000000cargo-options-0.6.0/tests/cmd/test.stdout000064400000000000000000000063471046102023000165550ustar 00000000000000Execute all unit and integration tests and build examples of a local package Usage: cargo-mimic[EXE] test [OPTIONS] [TESTNAME] [args]... Arguments: [TESTNAME] If specified, only run tests containing this string in their names [args]... Arguments for the test binary Options: -q, --quiet Do not print cargo log messages -j, --jobs Number of parallel jobs, defaults to # of CPUs --keep-going Do not abort the build as soon as there is an error (unstable) --profile Build artifacts with the specified Cargo profile -F, --features Space or comma separated list of features to activate --all-features Activate all available features --no-default-features Do not activate the `default` feature --target Build for the target triple [env: CARGO_BUILD_TARGET=] --target-dir Directory for all generated artifacts --message-format Error format -v, --verbose... Use verbose output (-vv very verbose/build.rs output) --color Coloring: auto, always, never --frozen Require Cargo.lock and cache are up to date --locked Require Cargo.lock is up to date --offline Run without accessing the network --config Override a configuration value (unstable) -Z Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details --timings[=...] Timing output formats (unstable) (comma separated): html, json --manifest-path Path to Cargo.toml -r, --release Build artifacts in release mode, with optimizations --ignore-rust-version Ignore `rust-version` specification in packages --unit-graph Output build graph in JSON (unstable) -p, --package [] Package to build (see `cargo help pkgid`) --workspace Test all packages in the workspace --exclude Exclude packages from the build --all Alias for workspace (deprecated) --lib Test only this package's library --bin [] Test only the specified binary --bins Test all binaries --example [] Test only the specified example --examples Test all examples --test Test only the specified test target --tests Test all tests --bench Test only the specified bench target --benches Test all benches --all-targets Test all targets --doc Test only this library's documentation --no-run Compile, but don't run tests --no-fail-fast Run all tests regardless of failure --future-incompat-report Outputs a future incompatibility report at the end of the build (unstable) -h, --help Print help Run `cargo help test` for more detailed information. Run `cargo test -- --help` for test binary options. cargo-options-0.6.0/tests/cmd/test.toml000064400000000000000000000000561046102023000161750ustar 00000000000000bin.name = "cargo-mimic" args = "test --help"