misalcedo / tortuga

A CGI and WCGI server for HTTP/1.1
Apache License 2.0
7 stars 0 forks source link

Read CLI banner information from Cargo #30

Closed misalcedo closed 3 years ago

misalcedo commented 3 years ago

Create a build script to output cargo information as singleton instance of a struct object. The main file will load the included module to read all of the cli infomation.

misalcedo commented 3 years ago

See https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates

misalcedo commented 3 years ago

Does not require a full build script. I can just set constants in the lib.rs file using env!. Then read them on main using tortuga::VERSION, etc.