Parse the given Wasm bytes into a `ComponentContext` tree. This will parse the input component and build up metadata that Wizer needs to know about the component. At this time there are limitations to this parsing phase which in theory could be lifted in the future but serve as simplifying assumptions for now: Nested components with modules are not supported. Imported modules or components are n
(full_wasm: &'a [u8])
| 20 | /// |
| 21 | /// Some of these restrictions are likely to be loosened over time, however. |
| 22 | pub(crate) fn parse<'a>(full_wasm: &'a [u8]) -> wasmtime::Result<ComponentContext<'a>> { |
| 23 | let mut component = ComponentContext::default(); |
| 24 | let parser = Parser::new(0).parse_all(full_wasm); |
| 25 | parse_into(Some(&mut component), full_wasm, parser)?; |
| 26 | Ok(component) |
| 27 | } |
| 28 | |
| 29 | fn parse_into<'a>( |
| 30 | mut cx: Option<&mut ComponentContext<'a>>, |
nothing calls this directly
no test coverage detected