File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919cargo :
2020 build_version : " 0.0.1"
2121 keywords : [cli]
22+ dependencies :
23+ - docopt = "*"
24+ - docopt_macros = "*"
25+ - rustc-serialize = "*"
Original file line number Diff line number Diff line change 1+ # ![feature(plugin)]
2+ # ![plugin(docopt_macros)]
3+
4+ extern crate docopt;
5+ extern crate rustc_serialize;
6+
7+ docopt!(Args derive Debug, "
8+ Usage: rtrace [options] (<OUTPUT-FILE >|-)
9+ rtrace --help
10+
11+ Options:
12+ --width <X > The width of the output image [default: 1024]
13+ --height <Y > The height of the output image [default: 1024]
14+ --samples-per-pixel <SAMPLES > Amount of samples per pixel. 4 means 16 over-samples [default: 1]
15+ --num-cores <NUM _CORES > Amount of cores to do the rendering on [default: 1]
16+ If this is not set, you may also use the RTRACEMAXPROCS
17+ environment variable, e.g. RTRACEMAXPROCS=4.
18+ The commandline always overrides environment variables.
19+
20+ <OUTPUT-FILE >|- Either a file with .tga extension, or - to write file to stdout
21+ "
22+ , flag_samples_per_pixel: u16
23+ , flag_height: u16
24+ , flag_width: u16
25+ , flag_num_cores: usize);
26+
127fn main() {
28+ let _: Args = Args::docopt().decode().unwrap_or_else(|e| e.exit());
229 println!("Hello, ${ id } !");
330}
You can’t perform that action at this time.
0 commit comments