pub struct FunctionBindgen<'a> {Show 25 fields
pub resource_map: &'a ResourceMap,
pub clear_resource_borrows: bool,
pub intrinsics: &'a mut BTreeSet<Intrinsic>,
pub valid_lifting_optimization: bool,
pub sizes: &'a SizeAlign,
pub err: ErrHandling,
pub tmp: usize,
pub src: Source,
pub block_storage: Vec<Source>,
pub blocks: Vec<(String, Vec<String>)>,
pub params: Vec<String>,
pub memory: Option<&'a String>,
pub realloc: Option<&'a String>,
pub post_return: Option<&'a String>,
pub tracing_prefix: &'a String,
pub tracing_enabled: bool,
pub encoding: StringEncoding,
pub callee: &'a str,
pub callee_resource_dynamic: bool,
pub resolve: &'a Resolve,
pub requires_async_porcelain: bool,
pub is_async: bool,
pub canon_opts: &'a CanonicalOptions,
pub iface_name: Option<&'a str>,
pub asmjs: bool,
}Fields§
§resource_map: &'a ResourceMapMapping of resources for types that have corresponding definitions locally
clear_resource_borrows: boolWhether current resource borrows need to be deactivated
intrinsics: &'a mut BTreeSet<Intrinsic>Set of intrinsics
valid_lifting_optimization: boolWhether to perform valid lifting optimization
sizes: &'a SizeAlignSizes and alignments for sub elements
err: ErrHandlingMethod of error handling
tmp: usizeTemporary values
src: SourceSource code of the function
block_storage: Vec<Source>Block storage
blocks: Vec<(String, Vec<String>)>Blocks of the function
params: Vec<String>Parameters of the function
memory: Option<&'a String>Memory variable
realloc: Option<&'a String>Realloc function name
post_return: Option<&'a String>Post return function name
tracing_prefix: &'a StringPrefix to use when printing tracing information
tracing_enabled: boolWhether tracing is enabled
encoding: StringEncodingMethod if string encoding
callee: &'a strCallee of the function
callee_resource_dynamic: boolWhether the callee is dynamic (i.e. has multiple operands)
resolve: &'a ResolveThe [wit_bindgen::Resolve] containing extracted WIT information
requires_async_porcelain: boolWhether the function requires async porcelain
In the case of an import this likely implies the use of JSPI and in the case of an export this is simply code generation metadata.
is_async: boolWhether the function is guest async lifted (i.e. WASI P3)
canon_opts: &'a CanonicalOptionsCanon opts
iface_name: Option<&'a str>Interface name
asmjs: boolWhether the callee was transpiled from Wasm to JS (asm.js) and thus needs shimming for i64
Trait Implementations§
Source§impl Bindgen for FunctionBindgen<'_>
impl Bindgen for FunctionBindgen<'_>
Source§fn push_block(&mut self)
fn push_block(&mut self)
Push a new block of code
Source§fn finish_block(&mut self, operands: &mut Vec<String>)
fn finish_block(&mut self, operands: &mut Vec<String>)
Finish a block of code
Source§fn return_pointer(
&mut self,
_size: ArchitectureSize,
_align: Alignment,
) -> String
fn return_pointer( &mut self, _size: ArchitectureSize, _align: Alignment, ) -> String
Output the return pointer