Struct build_info_build::BuildScriptOptions
source · pub struct BuildScriptOptions { /* private fields */ }
Expand description
Type to store any (optional) options for the build script.
Implementations§
source§impl BuildScriptOptions
impl BuildScriptOptions
sourcepub fn collect_dependencies(self, collect_dependencies: bool) -> Self
pub fn collect_dependencies(self, collect_dependencies: bool) -> Self
Enables and disables dependency collection.
Dependency data is fairly large, which may cause problems, mainly by crashing the build process. If the project compiles successfully with dependency collection enabled, you are probably fine.
source§impl BuildScriptOptions
impl BuildScriptOptions
sourcepub fn build_timestamp(self, timestamp: DateTime<Utc>) -> Self
pub fn build_timestamp(self, timestamp: DateTime<Utc>) -> Self
Set the build timestamp by hand.
This is mostly important for reproducible builds using only cargo. If possible, consider setting the environment
variable SOURCE_DATE_EPOCH
instead, which does not
require any setup.
sourcepub fn build_timestamp_as_nanos(self, nanos: i64) -> Self
pub fn build_timestamp_as_nanos(self, nanos: i64) -> Self
Set the build timestamp by hand as nanosecond-precise UNIX timestamp.
This is mostly important for reproducible builds using only cargo. If possible, consider setting the environment
variable SOURCE_DATE_EPOCH
instead, which does not
require any setup.