1use wrapc::{Info, parse};
2
3fn main() {
4 let args = vec![
6 "wrapc",
7 "-",
8 "rustc",
9 "--crate-name=my_crate",
10 "--edition=2021",
11 "-L",
12 "native=/usr/lib",
13 "-l",
14 "static:+bundle,+whole-archive=mylib:renamed_lib",
15 "--emit=link,dep-info=/tmp/dep.d",
16 "-C",
17 "opt-level=3",
18 "-Clink-arg=-fuse-ld=lld",
19 "src/main.rs",
20 "-o",
21 "sth.exe",
22 ];
23
24 let info: Info = parse(&args).expect("Failed to parse arguments");
25
26 println!("{:?}", info);
27
28 let reconstructed = info.to_args();
30 println!("\nReconstructed arguments: {:?}", reconstructed);
31}