Skip to main content

Module hl

Module hl 

Source

Functionsยง

emit_fn_hl_name
Construct the string that identifies a function on the wire between the guest and host: <instance>#<function> for instance members, e.g. wasi:http/types@0.2.0#[method]fields.get, and the plain function name for functions imported or exported directly by the world.
emit_hl_marshal_param
Emit code to marshal a parameter with value type pt from a Rust value named by id. The resultant token stream will be an expression which typechecks as Vec<u8>.
emit_hl_marshal_result
Emit code to marshal the result of a function with result type rt from a Rust value named by id. The resultant token stream will be an expression that which typechecks as Vec<u8>.
emit_hl_marshal_toplevel_value
Emit code to marshal a value from a toplevel type (i.e. types that cannot be represented inline in a valtype).
emit_hl_marshal_value
Emit code to marshal a value from an inline-able value type
emit_hl_unmarshal_param
Emit code to unmarshal a parameter with value type pt from a slice named by id. The resultant token stream will be an expression which typechecks at the Rust type (as defined by the crate::rtypes module) of the given value type.
emit_hl_unmarshal_result
Emit code to unmarshal the result of a function with result type rt from a slice named by id. The resultant token stream will be an expression which typechecks at the Rust type (as defined by the crate::rtypes module) of the unnamed type of the result, or unit if named results are used.
emit_hl_unmarshal_toplevel_value
Emit code to unmarshal a value into a toplevel type (i.e. types that cannot be represented inline in a valtype).
emit_hl_unmarshal_value
Emit code to unmarshal a value into an inline-able value type
resolve_handleable_to_resource
Find the resource index that the given Handleable refers to.