pub struct WasmBuildConfig {
pub language: Option<WasmLanguage>,
pub target: WasiTarget,
pub optimize: bool,
pub wit_path: Option<PathBuf>,
pub output_path: Option<PathBuf>,
}Expand description
Configuration for building a WASM component
Fields§
§language: Option<WasmLanguage>Source language (None = auto-detect)
target: WasiTargetTarget WASI version
optimize: boolWhether to optimize the output (release mode)
wit_path: Option<PathBuf>Path to WIT files for component model
output_path: Option<PathBuf>Override output path
Implementations§
Source§impl WasmBuildConfig
impl WasmBuildConfig
Sourcepub fn language(self, lang: WasmLanguage) -> Self
pub fn language(self, lang: WasmLanguage) -> Self
Set the source language
Sourcepub fn target(self, target: WasiTarget) -> Self
pub fn target(self, target: WasiTarget) -> Self
Set the WASI target
Sourcepub fn output_path(self, path: impl Into<PathBuf>) -> Self
pub fn output_path(self, path: impl Into<PathBuf>) -> Self
Set the output path
Trait Implementations§
Source§impl Clone for WasmBuildConfig
impl Clone for WasmBuildConfig
Source§fn clone(&self) -> WasmBuildConfig
fn clone(&self) -> WasmBuildConfig
Returns a duplicate 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 moreSource§impl Debug for WasmBuildConfig
impl Debug for WasmBuildConfig
Source§impl Default for WasmBuildConfig
impl Default for WasmBuildConfig
Source§fn default() -> WasmBuildConfig
fn default() -> WasmBuildConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WasmBuildConfig
impl RefUnwindSafe for WasmBuildConfig
impl Send for WasmBuildConfig
impl Sync for WasmBuildConfig
impl Unpin for WasmBuildConfig
impl UnsafeUnpin for WasmBuildConfig
impl UnwindSafe for WasmBuildConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more