Unverified Commit a7c6f3c4 authored by Robin Freyler's avatar Robin Freyler Committed by GitHub
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment