CoAP over Yggdrasil for Go.
Add syntax highlighting to code snippets in README
CI: separate fetch and build jobs
Add go module definition


browse log



You can also use your local clone with git send-email.

Yggdrasil-Go-CoAP status

This project is a fork of, adding Yggdrasil support to the library.

This project lives at, a bug tracker being available at


You can send me patches by email. Feel free to contact me directly if you have issues with this workflow.

Yggdrasil support

In order to support Yggdrasil, the following structure and methods are provided:

type YggdrasilNode struct {
    Core   *yggdrasil.Core
    Config *config.NodeConfig

func DialYggdrasil(node coapNet.YggdrasilNode, address string) (*ClientConn, error)
func ListenAndServeYggdrasil(node coapNet.YggdrasilNode, handler Handler) error

A complete example can be found on

Custom CoAP Options

This fork also allow to use custom CoAP options:

func SetOptionDef(oid OptionID, format string, minLen int, maxLen int)

// Example
var MyCustomCoAPOptionID coap.OptionID = 65000
coap.SetOptionDef(MyCustomCoAPOptionID, "string", 0, 255)

params := coap.MessageParams{ ... }
msg := c.NewMessage(params)

msg.SetOption(MyCustomCoAPOption, "spouik")