mte/unikernel/duniverse/paf-le-chien/unikernel/client/README.md
2025-11-11 02:07:51 +01:00

1.1 KiB

A MirageOS with Paf

This simple unikernel shows how to use paf and MirageOS as a client. We describe a new device http_client which is a composition of several modules such as happy-eyeballs (to be able to resolve domain name) and ca-certs to introduce an authenticator.

The usage of this unikernel is simple:

$ opam pin add -y https://github.com/dinosaure/paf-le-chien
$ git clone https://github.com/dinosaure/paf-le-chien
$ cp -r paf-le-chien/unikernel/client/* paf-unikernel/
$ cd paf-unikernel
$ mirage configure -t unix
$ make depends
$ mirage build
$ ./dist/minipaf -u https://www.google.com/

This unikernel is able to talk via http/1.1 and h2 (as paf can do). It prints out the response and the body (in hexadecimal format, thanks to [hxd][hxd]). The API of Http_mirage_client comes from the great project http-lwt-client which does the same but specially for the unix platform.