Skip to content

Latest commit

 

History

History
57 lines (51 loc) · 1.22 KB

README.md

File metadata and controls

57 lines (51 loc) · 1.22 KB

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)
Loading

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)
        }
    }
Loading