Refactor, cleanup and optimize Wasm module instantiation (#531)
* no longer make InstanceEntityBuilder own an InstanceEntity This allows for both structs to have different internal layouts optimized for their respective use cases. * use Box<str> instead of String in InstanceEntity[Builder] * add ExportsIter::size_hint impl * remove lifetime from InstancePre * add docs to some utility methods of InstanceEntityBuilder * cleanup instantiate code * preallocate buffers properly upon module instantiation * no longer clone Module::func_types upon instantiating The func_types buffer is now simply reused via efficient ref counting. * apply rustfmt * use Vec::reserve_exact in InstanceEntityBuilder::new * fix no_std build error * fix some internal doc links * apply clippy suggestions
parent
3a591c8a
Please register or sign in to comment