Drops support for the WebAssembly text format (#614)

This drops the text format (%.wat) and renames
InstantiateModuleFromCode to InstantiateModuleFromBinary as it is no
longer ambiguous.

We decided to stop supporting the text format as it isn't typically used
in production, yet costs a lot of work to develop. Given the resources
available and the increased work added with WebAssembly 2.0 and soon
WASI 2, we can't afford to spend the time on it.

The old parser is used only internally and will eventually be moved to
its own repository named watzero, possibly towards archival.

See #59

Signed-off-by: Adrian Cole <adrian@tetrate.io>
This commit is contained in:
Crypt Keeper
2022-06-01 19:01:43 +08:00
committed by GitHub
parent 7e5142f1a6
commit 92ba4929e5
77 changed files with 650 additions and 466 deletions

View File

@@ -393,7 +393,7 @@ func DecodeF64(input uint64) float64 {
return math.Float64frombits(input)
}
// ImportRenamer applies during compilation after a module has been decoded from source, but before it is instantiated.
// ImportRenamer applies during compilation after a module has been decoded from wasm, but before it is instantiated.
//
// For example, you may have a module like below, but the exported functions are in two different modules:
// (import "js" "increment" (func $increment (result i32)))
@@ -420,7 +420,7 @@ func DecodeF64(input uint64) float64 {
//
type ImportRenamer func(externType ExternType, oldModule, oldName string) (newModule, newName string)
// MemorySizer applies during compilation after a module has been decoded from source, but before it is instantiated.
// MemorySizer applies during compilation after a module has been decoded from wasm, but before it is instantiated.
// This determines the amount of memory pages (65536 bytes per page) to use when a memory is instantiated as a []byte.
//
// Ex. Here's how to set the capacity to max instead of min, when set: