Struct seacan::bin::Compiler [−][src]
pub struct Compiler { /* fields omitted */ }
Expand description
Compile a binary
let artifact = Compiler::bin("hello_world") .workspace("samples/hello_world") .features(FeatureSpec::new(vec!["non_default_feature".into()])) .release(true) .compile()?;
Implementations
impl Compiler
[src]
impl Compiler
[src]#[must_use]pub fn bin(name: impl Into<String>) -> Self
[src]
#[must_use]pub fn bin(name: impl Into<String>) -> Self
[src]Compile a binary.
Note: By default the default binary has the name of the crate.
pub fn workspace(&mut self, path: impl Into<PathBuf>) -> &mut Self
[src]
pub fn workspace(&mut self, path: impl Into<PathBuf>) -> &mut Self
[src]The directory to run cargo in.
By default the current working directory.
pub fn package(&mut self, package: PackageSpec) -> &mut Self
[src]
pub fn package(&mut self, package: PackageSpec) -> &mut Self
[src]The package the binary is in.
By default PackageSpec::Any
.
pub fn on_compiler_msg(
&mut self,
cb: impl FnMut(CompilerMessage) + 'static
) -> &mut Self
[src]
pub fn on_compiler_msg(
&mut self,
cb: impl FnMut(CompilerMessage) + 'static
) -> &mut Self
[src]Callback for compiler messages.
Regardless of if you specify this compiler messages will be logged at
debug level using tracing
.
pub fn target_dir(&mut self, target_dir: impl Into<Utf8PathBuf>) -> &mut Self
[src]
pub fn target_dir(&mut self, target_dir: impl Into<Utf8PathBuf>) -> &mut Self
[src]Where to put the build artifacts.
By default this is whatever cargo chooses by default.
pub fn features(&mut self, features: FeatureSpec) -> &mut Self
[src]
pub fn features(&mut self, features: FeatureSpec) -> &mut Self
[src]Enable or disable feature flags.
By default this is whatever cargo chooses by default.
pub fn compile(&mut self) -> Result<ExecutableArtifact, BuildError>
[src]
pub fn compile(&mut self) -> Result<ExecutableArtifact, BuildError>
[src]Compile the described executable
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Compiler
impl !Send for Compiler
impl !Sync for Compiler
impl Unpin for Compiler
impl !UnwindSafe for Compiler
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]