Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 882 Bytes

README.md

File metadata and controls

36 lines (22 loc) · 882 Bytes

Capsule Module SDK (Capsule MDK)

🚧 this is a work in progress

This SDK allows to create and manage WebAssembly modules for host applications using the Capsule Host Application SDK.

The Capsule Host SDK use the Wazero runtime to run the host application.

Getting started: the capsule plugin

package main

import (
	capsule "github.com/bots-garden/capsule-module-sdk"
)

func main() {
	capsule.SetHandle(Handle)
}

// Handle function
func Handle(param []byte) ([]byte, error) {

	capsule.Log("🟣 from the plugin: " + string(param))
	capsule.Print("💜 from the plugin: " + string(param))

	return []byte("Hello " + string(param)), nil
}

Getting started: the host application

👀 https://github.com/bots-garden/capsule-host-sdk#capsule-host-sdk