Creates a new bindings generator for the selected world.
(resolve: &'a Resolve, world: &'a World, sizes: &'a SizeAlign)
| 33 | impl<'a> Bindings<'a> { |
| 34 | /// Creates a new bindings generator for the selected world. |
| 35 | pub fn new(resolve: &'a Resolve, world: &'a World, sizes: &'a SizeAlign) -> Self { |
| 36 | let world_name = &world.name; |
| 37 | let wasm_var = GoIdentifier::private(format!("wasm-file-{world_name}")); |
| 38 | Self { |
| 39 | resolve, |
| 40 | world, |
| 41 | out: Tokens::new(), |
| 42 | raw_wasm_var: wasm_var, |
| 43 | sizes, |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | /// Adds the given Wasm to the bindings. |
| 48 | pub fn include_wasm(&mut self, wasm: WasmData) { |
nothing calls this directly
no outgoing calls
no test coverage detected