Go
This Go library uses CGO to consume the runtime APIs of the WAMR project which are defined in core/iwasm/include/wasm_export.h. The API details are available in the header files.
Installation
Installing from the source code
Installing from local source tree is in development mode.
Run ./build.sh in this folder to build the package, which builds the WAMR runtime library firstly and then builds the Go binding library.
Run ./build.sh under samples folder to build and test the sample.
cd samples
./build.shSupported APIs
All the embedding APIs supported are defined under folder wamr.
Runtime APIs
func Runtime() *_Runtime
func (self *_Runtime) FullInit(alloc_with_pool bool, heap_buf []byte,
max_thread_num uint) error
func (self *_Runtime) Init() error
func (self *_Runtime) Destroy()
func (self *_Runtime) SetLogLevel(level LogLevel)
func (self *_Runtime) Malloc(size uint32) *uint8
func (self *_Runtime) Free(ptr *uint8)Module APIs
Instance APIs
Sample codes
More samples can be found in test.go
Last updated