pub struct Build { /* private fields */ }
Expand description
Represents the configuration for building Lua artifacts.
Implementations§
Source§impl Build
impl Build
Sourcepub fn out_dir<P: AsRef<Path>>(&mut self, path: P) -> &mut Build
pub fn out_dir<P: AsRef<Path>>(&mut self, path: P) -> &mut Build
Sets the output directory for the build artifacts.
This is required if called outside of a build script.
Sourcepub fn target(&mut self, target: &str) -> &mut Build
pub fn target(&mut self, target: &str) -> &mut Build
Sets the target architecture for the build.
This is required if called outside of a build script.
Sourcepub fn host(&mut self, host: &str) -> &mut Build
pub fn host(&mut self, host: &str) -> &mut Build
Sets the host architecture for the build.
This is optional and will default to the environment variable HOST
if not set.
If called outside of a build script, it will default to the target architecture.
Sourcepub fn opt_level(&mut self, opt_level: &str) -> &mut Build
pub fn opt_level(&mut self, opt_level: &str) -> &mut Build
Sets the optimization level for the build.
This is optional and will default to the environment variable OPT_LEVEL
if not set.
If called outside of a build script, it will default to 0
in debug mode and 2
otherwise.
Sourcepub fn debug(&mut self, debug: bool) -> &mut Build
pub fn debug(&mut self, debug: bool) -> &mut Build
Sets whether to build in debug mode.
This is optional and will default to the value of cfg!(debug_assertions)
.
If set to true
, it also enables Lua API checks.