emit_tables

Function emit_tables 

Source
pub fn emit_tables<'a, 'b, 'c>(
    s: &'c mut State<'a, 'b>,
    rtsid: Ident,
    bound: TokenStream,
    sv: Option<TokenStream>,
    is_guest: bool,
)
Expand description

Emit a structure definition for a resource table that keeps track of resources lent/borrowed/given/taken to/from the other side of the Hyperlight boundary.

  • rtsid: The name of the struct to create
  • bound: a bound to be used for a phantom type variable that records the fact that these resource tables are only valid for a component that has been instantiated with a particular implementation of its imports
  • sv: optionally a bound to be used for a phantom type variable that records the fact that these resource tables are only valid for a particular implementation of a component