libcoap was developed as CoAP extension for Contiki 2.5 but as Contiki has evolved, libcoap also did. The master branch currently works with Contiki 2.7, support for Contiki 3 will be added soon.
To use libcoap as Contiki app, just add it to the apps folder in your
Contiki source tree. You can include libcoap then using APPS += libcoap
in your application's Makefile.
apps folder in your Contiki source
tree and name it "libcoap".APPS += libcoap in your
application's Makefile. You can find an example in
libcoap/examples/contiki/Makefile.contiki.libcoap/examples/contiki/server.c.