Closed JDeeth closed 7 months ago
Well I found the minimal solution to my example: EmitBuilder::builder().all_build().emit()?;
Could the Usage section instead have the full example from the EmitBuilder::emit
docs perhaps? If I understand right (if!), the current usage example simply does not emit anything!
edit: actually yes, if you start with EmitBuilder::builder().all_foo().all_bar().emit()
then the compiler tells you nicely which methods to remove for the features you've not selected, which is pretty intuitive.
Yeah, I admit the docs are not great at the top level. It's been awhile, but as I recall it was difficult to ensure that all of the configurations work at when the documentation is generated, but I think I can work around that now.
Sorry if I'm missing something incredibly obvious, but I think there's a step missing in the current Usage section? I get
error: environment variable VERGEN_... not defined at compile time
when I try to build my crate.Steps:
cargo new vergen-hello
,cd vergen-hello
Cargo.toml
as per docsbuild.rs
in project root as per docsenv!("VERGEN_BUILD_TIMESTAMP")
tosrc/main.rs
cargo build
>error: environment variable VERGEN_BUILD_TIMESTAMP not defined at compile time
cargo build
output:I've had the exact same result on Windows and Debian... sorry again if it's something elementary with Cargo I've not understood yet!
rustc v1.75.0