Struct sway_core::BuildConfig
source · pub struct BuildConfig { /* private fields */ }Expand description
Configuration for the overall build and compilation process.
Implementations§
source§impl BuildConfig
impl BuildConfig
sourcepub fn root_from_file_name_and_manifest_path(
root_module: PathBuf,
canonical_manifest_dir: PathBuf,
build_target: BuildTarget
) -> Self
pub fn root_from_file_name_and_manifest_path( root_module: PathBuf, canonical_manifest_dir: PathBuf, build_target: BuildTarget ) -> Self
Construct a BuildConfig from a relative path to the root module and the canonical path to
the manifest directory.
The root_module path must be either canonical, or relative to the directory containing
the manifest. E.g. project/src/main.sw or project/src/lib.sw.
The canonical_manifest_dir must be the canonical (aka absolute) path to the directory
containing the Forc.toml file for the project. E.g. /home/user/project.
pub fn print_dca_graph(self, a: bool) -> Self
pub fn print_intermediate_asm(self, a: bool) -> Self
pub fn print_finalized_asm(self, a: bool) -> Self
pub fn print_ir(self, a: bool) -> Self
sourcepub fn include_tests(self, include_tests: bool) -> Self
pub fn include_tests(self, include_tests: bool) -> Self
Whether or not to include test functions in parsing, type-checking and codegen.
This should be set to true by invocations like forc test or forc check --tests.
Default: false
pub fn canonical_root_module(&self) -> Arc<PathBuf>
Trait Implementations§
source§impl Clone for BuildConfig
impl Clone for BuildConfig
source§fn clone(&self) -> BuildConfig
fn clone(&self) -> BuildConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl RefUnwindSafe for BuildConfig
impl Send for BuildConfig
impl Sync for BuildConfig
impl Unpin for BuildConfig
impl UnwindSafe for BuildConfig
Blanket Implementations§
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.