Skip to content

Commit

Permalink
doc(module) Document ExportDescriptor & siblings.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hywan committed Jun 7, 2019
1 parent f38efde commit 2172de5
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions wasmer/module.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,32 @@ func (error *ModuleError) Error() string {
return error.message
}

// ExportDescriptor represents an export descriptor of a WebAssembly
// module. It is different of an export of a WebAssembly instance. An
// export descriptor only has a name and a kind/type.
type ExportDescriptor struct {
// The export name.
Name string

// The export kind/type.
Kind ExportKind
}

// ExportKind represents an export descriptor kind/type.
type ExportKind int

const (
// ExportKindFunction represents an export descriptor of kind function.
ExportKindFunction = ExportKind(cWasmFunction)
ExportKindGlobal = ExportKind(cWasmGlobal)
ExportKindMemory = ExportKind(cWasmMemory)
ExportKindTable = ExportKind(cWasmTable)

// ExportKindGlobal represents an export descriptor of kind global.
ExportKindGlobal = ExportKind(cWasmGlobal)

// ExportKindMemory represents an export descriptor of kind memory.
ExportKindMemory = ExportKind(cWasmMemory)

// ExportKindTable represents an export descriptor of kind table.
ExportKindTable = ExportKind(cWasmTable)
)

// Module represents a WebAssembly module.
Expand Down

0 comments on commit 2172de5

Please sign in to comment.