# A list of commands to pre-configure the project

**URL:** <https://internals.rust-lang.org/t/a-list-of-commands-to-pre-configure-the-project/17492>\
**Category:** cargo\
**Created:** [October 5, 2022, 6:10am UTC](https://internals.rust-lang.org/t/a-list-of-commands-to-pre-configure-the-project/17492 "2022-10-05T06:10:12Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![matklad](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/matklad/32/12266_2.png) [@matklad](https://internals.rust-lang.org/u/matklad)\
**Post date:** [October 12, 2022, 3:16pm UTC](https://internals.rust-lang.org/t/a-list-of-commands-to-pre-configure-the-project/17492/8 "2022-10-12T15:16:20Z")

</div>

Yeah, I just usually shell out to `cargo metadata` to get a string, and then do a string search therein. Another hack is that, to get version from Cargo.toml, I shell out to `cargo pkgid`. If cargo contained some plumbing commands so that I can run `cargo metadata --query "dependencies"` and get result as a list of strings, that would simplify a bunch of tasks.

Alternatively, I am fairly certain that it's possible to implement a version of `https://docs.rs/cargo_metadata/latest/cargo_metadata/` which is massively more lightweight, by not depending on serde ecosystem, and just pre-generating all parsing code for a _fixed_ structure it has to deal with.

That... actually I think is a project the ecosystem could benefit quite a bit I think.

---

_[View the full topic](https://internals.rust-lang.org/t/a-list-of-commands-to-pre-configure-the-project/17492)._
