5 releases
Uses new Rust 2024
| 0.0.5 | Nov 9, 2025 |
|---|---|
| 0.0.4 | Nov 9, 2025 |
| 0.0.3 | Nov 8, 2025 |
| 0.0.2 | Aug 8, 2025 |
| 0.0.1 | Aug 8, 2025 |
#251 in Operating systems
33KB
428 lines
wesl-metadata
Structured access to the output of wesl metadata.
lib.rs:
Structured access to the output of wesl metadata.
Examples
Get the current package's metadata with all dependency information.
let _metadata = MetadataCommand::new().exec().unwrap();
If you have a program that takes --manifest-path as an argument, you can forward that
to MetadataCommand:
let mut args = std::env::args().skip_while(|val| !val.starts_with("--manifest-path"));
let mut cmd = MetadataCommand::new();
let manifest_path = match args.next() {
Some(ref p) if p == "--manifest-path" => {
cmd.manifest_path(args.next().unwrap());
}
Some(p) => {
cmd.manifest_path(p.trim_start_matches("--manifest-path="));
}
None => {}
};
let _metadata = cmd.exec().unwrap();
Pass features flags, e.g. --all-features.
let _metadata = MetadataCommand::new()
.manifest_path("./wesl.toml")
.exec()
.unwrap();
Dependencies
~0.7–1.7MB
~34K SLoC