go-wasm

module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 22, 2025 License: MIT

README

go-wasm

experiments with wasm

Phases

sequenceDiagram    
    alt binary
        Machine->>Decoder: Decode(Binary)
        Decoder->>Machine: Api
    else text
        Machine->>Decoder: Decode(Text) Api
        Decoder->>Machine: Api
    end
    Machine->>Validator: Validate(Api)
    Validator->>Machine: []Errors
    Machine->>Instantiator: Instantiate(Api)
    Instantiator->>Machine: Instance
    Machine->>Invoker: Invoke(Instance, ExternalFunction)

Structure

classDiagram
    
    DirectiveApi<|--ModuleApi
    DirectiveApi<|--ComponentApi

    namespace binary{
        class BinaryDecoder{
            +decode(bytes) : DirectiveApi
        }        
    }
    namespace text{
        class TextDecoder{
            +decode(bytes) : DirectiveApi
        }   
    }
    namespace api{
        class DirectiveApi
        class ModuleApi
        class ComponentApi
    }
    namespace instance{
        class DirectiveInstance
        class ModuleInstance
        class ComponentInstancce
    }
    namespace machine{
        class Machine{
            +instantiate(DirectiveApi) : DirectiveInstance
            +invoke(ModuleInstance)
            +call(ComponentInstance, ExternalFunction)
        }
    }

Directories

Path Synopsis
abi
io
The binary package handles reading and writing of wasm binary files https://webassembly.github.io/spec/core/binary/index.html
The binary package handles reading and writing of wasm binary files https://webassembly.github.io/spec/core/binary/index.html
internal
to
wast
ast
wat
ast
lex
wit
ast
lex
parse
package wit covers parsing and generating wit files https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md
package wit covers parsing and generating wit files https://github.com/WebAssembly/component-model/blob/main/design/mvp/WIT.md

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL