Rust Cargo命令打印目标文件列表?

Rust Cargo命令打印目标文件列表?,rust,rust-cargo,Rust,Rust Cargo,获取cargo以打印运行cargo build后将输出的文件列表的命令是什么?将打印一个JSON对象,其中包含可以使用的目标键。用于过滤和漂亮打印,以下是rustfmt板条箱结帐时的输出: ➜ cargo read-manifest | jq '.targets' [ { "kind": [ "lib" ], "name": "rustfmt", "src_path": "/Users/.../rustfmt/src/lib.rs" },

获取
cargo
以打印运行
cargo build
后将输出的文件列表的命令是什么?

将打印一个JSON对象,其中包含可以使用的
目标
键。用于过滤和漂亮打印,以下是
rustfmt
板条箱结帐时的输出:

➜ cargo read-manifest | jq '.targets'
[
  {
    "kind": [
      "lib"
    ],
    "name": "rustfmt",
    "src_path": "/Users/.../rustfmt/src/lib.rs"
  },
  {
    "kind": [
      "bin"
    ],
    "name": "cargo-fmt",
    "src_path": "/Users/.../rustfmt/src/bin/cargo-fmt.rs"
  },
  {
    "kind": [
      "bin"
    ],
    "name": "rustfmt",
    "src_path": "/Users/.../rustfmt/src/bin/rustfmt.rs"
  },
  {
    "kind": [
      "custom-build"
    ],
    "name": "build-script-build",
    "src_path": "build.rs"
  },
  {
    "kind": [
      "test"
    ],
    "name": "system",
    "src_path": "/Users/.../rustfmt/tests/system.rs"
  }
]

您还希望
lib.rs
(或
main.rs
)包含的所有文件都使用
mod?据我所知,这个问题不可能完全回答,因为他们能够输出他们想要的任何文件。不包括.dylib、.exe或.so扩展名?