Deprecate Module::new_streaming[_unchecked]
APIs
#1540
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
Module::new_streaming[_unchecked]
APIs existed in Wasmi since the very beginning (thought differently named).They implement the streaming Wasm module creation interface which is supposedly more efficient than the non-streaming API if Wasm bytes transmission and Wasm module translation are both slow. The idea is to stream in bytes in order to build up a Wasm module incrementally. However, the streaming nature adds overhead to parsing which kinda nullifies the gains. Also Wasmi translation is extremely fast, so streaming usually adds more overhead than is reduced.
As I am not 100% certain that nobody would ever have a serious use for this API, I will deprecate it first and let users know that they shall notify me here in case they have a valid use case for this API.
Removing the streaming APIs make room for a slightly more efficient and lightweight Wasm parser which could simplify the task at: #1514