pub struct WebBuilder { /* private fields */ }Available on crate feature
builders only.Expand description
Builds a benchmark crate for the browser and generates a static harness.
Implementations§
Source§impl WebBuilder
impl WebBuilder
Sourcepub fn new(
project_root: impl Into<PathBuf>,
crate_name: impl Into<String>,
) -> Self
pub fn new( project_root: impl Into<PathBuf>, crate_name: impl Into<String>, ) -> Self
Creates a web builder for one benchmark crate.
Sourcepub fn library_name(self, library_name: impl Into<String>) -> Self
pub fn library_name(self, library_name: impl Into<String>) -> Self
Overrides the Rust library artifact name.
Sourcepub fn crate_dir(self, crate_dir: impl Into<PathBuf>) -> Self
pub fn crate_dir(self, crate_dir: impl Into<PathBuf>) -> Self
Overrides the benchmark crate directory.
Sourcepub fn output_dir(self, output_dir: impl Into<PathBuf>) -> Self
pub fn output_dir(self, output_dir: impl Into<PathBuf>) -> Self
Overrides the Mobench output root.
Sourcepub fn wasm_bindgen(self, wasm_bindgen: impl Into<PathBuf>) -> Self
pub fn wasm_bindgen(self, wasm_bindgen: impl Into<PathBuf>) -> Self
Selects the wasm-bindgen executable or explicit path.
Sourcepub fn dry_run(self, dry_run: bool) -> Self
pub fn dry_run(self, dry_run: bool) -> Self
Prints the deterministic build plan without running tools or writing files.
Sourcepub fn build(
&self,
config: &WebBuildConfig,
) -> Result<WebBuildResult, BenchError>
pub fn build( &self, config: &WebBuildConfig, ) -> Result<WebBuildResult, BenchError>
Compiles the crate and emits a complete browser bundle.
Auto Trait Implementations§
impl Freeze for WebBuilder
impl RefUnwindSafe for WebBuilder
impl Send for WebBuilder
impl Sync for WebBuilder
impl Unpin for WebBuilder
impl UnsafeUnpin for WebBuilder
impl UnwindSafe for WebBuilder
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