CompiledModule: export Custom Sections (#1048)

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
Co-authored-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
This commit is contained in:
Edoardo Vacchi
2023-01-19 13:39:43 +01:00
committed by GitHub
parent f484f22e47
commit d07c40f5d6
5 changed files with 153 additions and 1 deletions

View File

@@ -562,6 +562,14 @@ type Memory interface {
WriteString(offset uint32, v string) bool
}
// CustomSection contains the name and raw data of a custom section.
type CustomSection interface {
// Name is the name of the custom section
Name() string
// Data is the raw data of the custom section
Data() []byte
}
// EncodeExternref encodes the input as a ValueTypeExternref.
//
// See DecodeExternref