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;
}Expand description
Common interface for post-build (transpilation) arguments.
Required Methods§
Sourcefn out_dir(&self) -> &Utf8PathBuf
fn out_dir(&self) -> &Utf8PathBuf
Returns the output directory path.
Sourcefn keep_build_artifacts(&self) -> bool
fn keep_build_artifacts(&self) -> bool
Returns whether to keep intermediate build artifacts.
Sourcefn adjust_abi(&self) -> bool
fn adjust_abi(&self) -> bool
Returns whether to adjust the ABI.
Sourcefn transpile_to_js(
&self,
component: &[u8],
name: impl AsRef<str>,
) -> Result<Transpiled, Error>
fn transpile_to_js( &self, component: &[u8], name: impl AsRef<str>, ) -> Result<Transpiled, Error>
Transpiles the given WebAssembly component into JavaScript source files.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".