Generates the factory and instantiate functions, including any required interfaces.
(
&mut self,
analyzed_imports: &AnalyzedImports,
import_chains: BTreeMap<String, Tokens<Go>>,
)
| 73 | /// Generates the factory and instantiate functions, including any |
| 74 | /// required interfaces. |
| 75 | fn generate_factory( |
| 76 | &mut self, |
| 77 | analyzed_imports: &AnalyzedImports, |
| 78 | import_chains: BTreeMap<String, Tokens<Go>>, |
| 79 | ) { |
| 80 | let config = FactoryConfig { |
| 81 | analyzed_imports, |
| 82 | import_chains, |
| 83 | wasm_var_name: &self.raw_wasm_var, |
| 84 | }; |
| 85 | FactoryGenerator::new(config).format_into(&mut self.out) |
| 86 | } |
| 87 | |
| 88 | /// Generates all exports for the world. |
| 89 | /// |