Skip to main content

WasmModuleBuilder

Struct WasmModuleBuilder 

Source
pub struct WasmModuleBuilder { /* private fields */ }
Expand description

Spec-compliant .wasm binary encoder producing genuine executable WebAssembly modules for euv native rendering.

Implementations§

Source§

impl WasmModuleBuilder

Spec-compliant WebAssembly binary encoder methods for WasmModuleBuilder.

Source

pub fn partial_spec(spec: &DynamicNodeSpec) -> Self

Starts building a partial-slot .wasm module emitting spec through env::euv_emit_ui.

§Arguments
  • &DynamicNodeSpec - Primary native UI subtree specification.
§Returns
  • Self - Configured .wasm builder.
Source

pub fn global_bundle(bundle: &DynamicUpdateBundle) -> Self

Starts building a global full-app .wasm module emitting bundle through env::euv_emit_bundle.

§Arguments
  • &DynamicUpdateBundle - Full-app dynamic bundle specification.
§Returns
  • Self - Configured global .wasm builder.
Source

pub fn with_alt_spec(self, alt: &DynamicNodeSpec) -> Self

Attaches an alternate interactive UI spec rendered whenever euv_render(state) receives a non-zero state.

§Arguments
  • Self - Source builder.
  • &DynamicNodeSpec - Alternate interactive state UI spec.
§Returns
  • Self - Updated builder.
Source

pub fn with_alt_bundle(self, bundle: &DynamicUpdateBundle) -> Self

Attaches an alternate global DynamicUpdateBundle JSON payload emitted when euv_on_event toggles state.

§Arguments
  • Self - Source builder.
  • &DynamicUpdateBundle - Alternate global bundle for odd state ticks.
§Returns
  • Self - Updated builder.
Source

pub fn with_log(self, message: String) -> Self

Attaches a diagnostic log message emitted via env::euv_log during render.

§Arguments
  • Self - Source builder.
  • String - Log line text.
§Returns
  • Self - Updated builder.
Source

pub fn with_abi_version(self, abi: u32) -> Self

Overrides the reported ABI version (used to test ABI mismatch rejection).

§Arguments
  • Self - Source builder.
  • u32 - ABI version returned by euv_abi_version.
§Returns
  • Self - Updated builder.
Source

pub fn without_render_export(self) -> Self

Omits the euv_render export (used to test missing export rejection).

§Arguments
  • Self - Source builder.
§Returns
  • Self - Updated builder.
Source

pub fn with_fault(self, fault: WasmFaultKind) -> Self

Compiles a deterministic sandbox fault (InfiniteLoopOutOfFuel / ExecutionTrap) into euv_render.

§Arguments
  • Self - Source builder.
  • WasmFaultKind - Fault behavior to compile.
§Returns
  • Self - Updated builder.
Source

pub fn build(&self) -> Vec<u8> ⓘ

Emits a complete spec-compliant executable .wasm binary buffer.

§Arguments
  • &Self - Configured builder.
§Returns
  • Vec<u8> - Valid WebAssembly MVP binary bytes (\0asm\x01\0\0\0...).
Source§

impl WasmModuleBuilder

Source

pub fn get_abi_version(&self) -> u32

Source

pub fn get_mut_abi_version(&mut self) -> &mut u32

Source

pub fn set_abi_version(&mut self, val: u32) -> &mut Self

Source

pub fn get_export_render(&self) -> bool

Source

pub fn get_mut_export_render(&mut self) -> &mut bool

Source

pub fn set_export_render(&mut self, val: bool) -> &mut Self

Source

pub fn get_is_global_bundle(&self) -> bool

Source

pub fn get_mut_is_global_bundle(&mut self) -> &mut bool

Source

pub fn set_is_global_bundle(&mut self, val: bool) -> &mut Self

Source

pub fn get_ui_payload_json(&self) -> &String

Source

pub fn get_mut_ui_payload_json(&mut self) -> &mut String

Source

pub fn set_ui_payload_json(&mut self, val: String) -> &mut Self

Source

pub fn get_alt_ui_payload_json(&self) -> &String

Source

pub fn get_mut_alt_ui_payload_json(&mut self) -> &mut String

Source

pub fn set_alt_ui_payload_json(&mut self, val: String) -> &mut Self

Source

pub fn get_log_message(&self) -> &String

Source

pub fn get_mut_log_message(&mut self) -> &mut String

Source

pub fn set_log_message(&mut self, val: String) -> &mut Self

Source

pub fn get_fault(&self) -> WasmFaultKind

Source

pub fn get_mut_fault(&mut self) -> &mut WasmFaultKind

Source

pub fn set_fault(&mut self, val: WasmFaultKind) -> &mut Self

Source

pub fn get_custom_meta(&self) -> &Vec<u8> ⓘ

Source

pub fn get_mut_custom_meta(&mut self) -> &mut Vec<u8> ⓘ

Source

pub fn set_custom_meta(&mut self, val: Vec<u8>) -> &mut Self

Trait Implementations§

Source§

impl Clone for WasmModuleBuilder

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for WasmModuleBuilder

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for WasmModuleBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.