This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
22
unikernel/duniverse/ocaml-h2/examples/mirage/config.ml
Normal file
22
unikernel/duniverse/ocaml-h2/examples/mirage/config.ml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
open Mirage
|
||||
|
||||
(* Network configuration *)
|
||||
|
||||
let stack = generic_stackv4 default_network
|
||||
|
||||
(* Dependencies *)
|
||||
|
||||
let server =
|
||||
let packages =
|
||||
[ package ~pin:"file://../../" "h2-lwt"
|
||||
; package ~pin:"file://../../" "h2-mirage"
|
||||
]
|
||||
in
|
||||
foreign "Unikernel.Make" ~packages (console @-> pclock @-> http2 @-> job)
|
||||
|
||||
let app = http2_server @@ conduit_direct stack
|
||||
|
||||
let () =
|
||||
register
|
||||
"h2_unikernel"
|
||||
[ server $ default_console $ default_posix_clock $ app ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue