pub struct WasmBackend { /* private fields */ }Expand description
The WebAssembly code generation backend.
Compiles LCNF function declarations to WebAssembly text format (WAT).
Implementations§
Source§impl WasmBackend
impl WasmBackend
Sourcepub fn compile_decl(&mut self, decl: &LcnfFunDecl) -> WasmFunc
pub fn compile_decl(&mut self, decl: &LcnfFunDecl) -> WasmFunc
Compile a single LCNF function declaration to a WasmFunc.
Sourcepub fn emit_module(decls: &[LcnfFunDecl]) -> Result<String, String>
pub fn emit_module(decls: &[LcnfFunDecl]) -> Result<String, String>
Compile a slice of LCNF function declarations and emit a WAT string.
Trait Implementations§
Source§impl Debug for WasmBackend
impl Debug for WasmBackend
Source§impl Default for WasmBackend
impl Default for WasmBackend
Source§fn default() -> WasmBackend
fn default() -> WasmBackend
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WasmBackend
impl RefUnwindSafe for WasmBackend
impl Send for WasmBackend
impl Sync for WasmBackend
impl Unpin for WasmBackend
impl UnsafeUnpin for WasmBackend
impl UnwindSafe for WasmBackend
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