Skip to main content

PostBuildContext

Trait PostBuildContext 

Source
pub trait PostBuildContext {
    // Required methods
    fn out_dir(&self) -> &Utf8PathBuf;
    fn keep_build_artifacts(&self) -> bool;
    fn adjust_abi(&self) -> bool;
    fn transpile_to_js(
        &self,
        component: &[u8],
        name: impl AsRef<str>,
    ) -> Result<Transpiled, Error>;
    fn dev(&self) -> bool;
    fn validate(&self) -> bool;
}
Expand description

Common interface for post-build (transpilation) arguments.

Required Methods§

Source

fn out_dir(&self) -> &Utf8PathBuf

Returns the output directory path.

Source

fn keep_build_artifacts(&self) -> bool

Returns whether to keep intermediate build artifacts.

Source

fn adjust_abi(&self) -> bool

Returns whether to adjust the ABI.

Source

fn transpile_to_js( &self, component: &[u8], name: impl AsRef<str>, ) -> Result<Transpiled, Error>

Transpiles the given WebAssembly component into JavaScript source files.

Source

fn dev(&self) -> bool

Returns whether to skip Wasm optimization (dev mode).

Source

fn validate(&self) -> bool

Returns whether to validate generated Wasm modules.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§