From 4738cd502caada01d66863e9dc02384687138826 Mon Sep 17 00:00:00 2001 From: Antonio Nuno Monteiro Date: Sun, 7 Apr 2019 00:01:41 +0100 Subject: [PATCH] rm mirage files that leaked into this branch --- examples/mirage/.mirage.config | 4 - examples/mirage/Makefile | 22 ---- examples/mirage/httpaf_unikernel | 1 - examples/mirage/key_gen.ml | 46 ------- examples/mirage/main.ml | 123 ------------------ ...irage-unikernel-httpaf_unikernel-unix.opam | 28 ---- examples/mirage/myocamlbuild.ml | 0 7 files changed, 224 deletions(-) delete mode 100644 examples/mirage/.mirage.config delete mode 100644 examples/mirage/Makefile delete mode 120000 examples/mirage/httpaf_unikernel delete mode 100644 examples/mirage/key_gen.ml delete mode 100644 examples/mirage/main.ml delete mode 100644 examples/mirage/mirage-unikernel-httpaf_unikernel-unix.opam delete mode 100644 examples/mirage/myocamlbuild.ml diff --git a/examples/mirage/.mirage.config b/examples/mirage/.mirage.config deleted file mode 100644 index a6cb257d..00000000 --- a/examples/mirage/.mirage.config +++ /dev/null @@ -1,4 +0,0 @@ -mirage -configure --t -unix \ No newline at end of file diff --git a/examples/mirage/Makefile b/examples/mirage/Makefile deleted file mode 100644 index 72c88b37..00000000 --- a/examples/mirage/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# Generated by mirage configure -t unix (2019-03-11 12:42:42-00:00). - --include Makefile.user - -OPAM = opam -DEPEXT ?= $(OPAM) pin add -k path --no-action --yes mirage-unikernel-httpaf_unikernel-unix . &&\ - $(OPAM) depext --yes --update mirage-unikernel-httpaf_unikernel-unix ;\ - $(OPAM) pin remove --no-action mirage-unikernel-httpaf_unikernel-unix - -.PHONY: all depend depends clean build -all:: build - -depend depends:: - $(DEPEXT) - $(OPAM) install -y --deps-only . - -build:: - mirage build - -clean:: - mirage clean - diff --git a/examples/mirage/httpaf_unikernel b/examples/mirage/httpaf_unikernel deleted file mode 120000 index 74d866c5..00000000 --- a/examples/mirage/httpaf_unikernel +++ /dev/null @@ -1 +0,0 @@ -_build/main.native \ No newline at end of file diff --git a/examples/mirage/key_gen.ml b/examples/mirage/key_gen.ml deleted file mode 100644 index d4db48c2..00000000 --- a/examples/mirage/key_gen.ml +++ /dev/null @@ -1,46 +0,0 @@ -(* Generated by mirage configure -t unix (2019-03-11 12:42:42-00:00). *) - -let dhcp () = false - -let ips =Functoria_runtime.Key.create - (Functoria_runtime.Arg.opt (Cmdliner.Arg.list Mirage_runtime.Arg.ipv4_address) - [(Ipaddr.V4.of_string_exn "0.0.0.0")] (Cmdliner.Arg.info - ~docs:"UNIKERNEL PARAMETERS" ?docv:(Some "IPS") - ?doc:(Some "The IPv4 addresses bound by the socket in the unikernel. ") - ?env:(None) ["ips"])) -let ips_t = Functoria_runtime.Key.term ips -let ips () = Functoria_runtime.Key.get ips - -let logs =Functoria_runtime.Key.create - (Functoria_runtime.Arg.opt (Cmdliner.Arg.list Mirage_runtime.Arg.log_threshold) [] (Cmdliner.Arg.info - ~docs:"UNIKERNEL PARAMETERS" ?docv:(Some "LEVEL") - ?doc:(Some - "Be more or less verbose. $(docv) must be of the form\n$(b,*:info,foo:debug) means that that the log threshold is set to\n$(b,info) for every log sources but the $(b,foo) which is set to\n$(b,debug). ") - ?env:(Some (Cmdliner.Arg.env_var "MIRAGE_LOGS")) ["l"; "logs"])) -let logs_t = Functoria_runtime.Key.term logs -let logs () = Functoria_runtime.Key.get logs - -let net () = (None) - -let no_depext () = false - -let prng () = `Stdlib - -let socket =Functoria_runtime.Key.create - (Functoria_runtime.Arg.opt (Cmdliner.Arg.some Mirage_runtime.Arg.ipv4_address) - (None) (Cmdliner.Arg.info ~docs:"UNIKERNEL PARAMETERS" - ?docv:(Some "SOCKET") - ?doc:(Some "The IPv4 address bound by the socket in the unikernel. ") - ?env:(None) ["socket"])) -let socket_t = Functoria_runtime.Key.term socket -let socket () = Functoria_runtime.Key.get socket - -let target () = `Unix - -let target_debug () = false - -let warn_error () = false - -let runtime_keys = List.combine [ips_t; logs_t; socket_t] ["ips"; "logs"; - "socket"] - diff --git a/examples/mirage/main.ml b/examples/mirage/main.ml deleted file mode 100644 index b5766cb4..00000000 --- a/examples/mirage/main.ml +++ /dev/null @@ -1,123 +0,0 @@ -(* Generated by mirage configure -t unix (2019-03-11 12:42:42-00:00). *) - -open Lwt.Infix -let return = Lwt.return -let run = -OS.Main.run - -let _ = Printexc.record_backtrace true - -module Conduit_mirage1 = Conduit_mirage.With_tcp(Tcpip_stack_socket) - -module Unikernel1 = Unikernel.Make(Console_unix)(Pclock) - (Httpaf_mirage.Server_with_conduit) - -module Mirage_logs1 = Mirage_logs.Make(Pclock) - -let tcpv4_socket11 = lazy ( - Tcpv4_socket.connect (Key_gen.socket ()) - ) - -let udpv4_socket11 = lazy ( - Udpv4_socket.connect (Key_gen.socket ()) - ) - -let stackv4_socket1 = lazy ( - let __udpv4_socket11 = Lazy.force udpv4_socket11 in - let __tcpv4_socket11 = Lazy.force tcpv4_socket11 in - __udpv4_socket11 >>= fun _udpv4_socket11 -> - __tcpv4_socket11 >>= fun _tcpv4_socket11 -> - Tcpip_stack_socket.connect (Key_gen.ips ()) _udpv4_socket11 _tcpv4_socket11 - ) - -let nocrypto1 = lazy ( - Nocrypto_entropy_lwt.initialize () - ) - -let tcp_conduit_connector1 = lazy ( - let __stackv4_socket1 = Lazy.force stackv4_socket1 in - __stackv4_socket1 >>= fun _stackv4_socket1 -> - Lwt.return (Conduit_mirage1.connect _stackv4_socket1) - - ) - -let conduit11 = lazy ( - let __nocrypto1 = Lazy.force nocrypto1 in - let __tcp_conduit_connector1 = Lazy.force tcp_conduit_connector1 in - __nocrypto1 >>= fun _nocrypto1 -> - __tcp_conduit_connector1 >>= fun _tcp_conduit_connector1 -> - Lwt.return Conduit_mirage.empty >>= _tcp_conduit_connector1 >>= -fun t -> Lwt.return t - ) - -let argv_unix1 = lazy ( - Bootvar.argv () - ) - -let console_unix_01 = lazy ( - Console_unix.connect "0" - ) - -let pclock1 = lazy ( - Pclock.connect () - ) - -let httpaf1 = lazy ( - let __conduit11 = Lazy.force conduit11 in - __conduit11 >>= fun _conduit11 -> - Httpaf_mirage.Server_with_conduit.connect _conduit11 - ) - -let key1 = lazy ( - let __argv_unix1 = Lazy.force argv_unix1 in - __argv_unix1 >>= fun _argv_unix1 -> - return (Functoria_runtime.with_argv (List.map fst Key_gen.runtime_keys) "httpaf_unikernel" _argv_unix1) - ) - -let noop1 = lazy ( - return () - ) - -let f11 = lazy ( - let __console_unix_01 = Lazy.force console_unix_01 in - let __pclock1 = Lazy.force pclock1 in - let __httpaf1 = Lazy.force httpaf1 in - __console_unix_01 >>= fun _console_unix_01 -> - __pclock1 >>= fun _pclock1 -> - __httpaf1 >>= fun _httpaf1 -> - Unikernel1.start _console_unix_01 _pclock1 _httpaf1 - ) - -let mirage_logs1 = lazy ( - let __pclock1 = Lazy.force pclock1 in - __pclock1 >>= fun _pclock1 -> - let ring_size = None in - let reporter = Mirage_logs1.create ?ring_size _pclock1 in - Mirage_runtime.set_level ~default:Logs.Info (Key_gen.logs ()); - Mirage_logs1.set_reporter reporter; - Lwt.return reporter - ) - -let mirage1 = lazy ( - let __noop1 = Lazy.force noop1 in - let __noop1 = Lazy.force noop1 in - let __key1 = Lazy.force key1 in - let __mirage_logs1 = Lazy.force mirage_logs1 in - let __f11 = Lazy.force f11 in - __noop1 >>= fun _noop1 -> - __noop1 >>= fun _noop1 -> - __key1 >>= fun _key1 -> - __mirage_logs1 >>= fun _mirage_logs1 -> - __f11 >>= fun _f11 -> - Lwt.return_unit - ) - -let () = - let t = - Lazy.force noop1 >>= fun _ -> - Lazy.force noop1 >>= fun _ -> - Lazy.force key1 >>= fun _ -> - Lazy.force mirage_logs1 >>= fun _ -> - Lazy.force mirage1 - in run t - diff --git a/examples/mirage/mirage-unikernel-httpaf_unikernel-unix.opam b/examples/mirage/mirage-unikernel-httpaf_unikernel-unix.opam deleted file mode 100644 index df63c21f..00000000 --- a/examples/mirage/mirage-unikernel-httpaf_unikernel-unix.opam +++ /dev/null @@ -1,28 +0,0 @@ -# Generated by mirage configure -t unix (2019-03-11 12:42:42-00:00). -opam-version: "2.0" -name: "mirage-unikernel-httpaf_unikernel-unix" -depends: [ "functoria-runtime" - "httpaf-mirage" - "lwt" - "mirage" {build & >="3.5.0" & <"3.6.0"} - "mirage-bootvar-unix" {>="0.1.0" & <"0.2.0"} - "mirage-clock-unix" {>="2.0.0" & <"3.0.0"} - "mirage-conduit" {>="3.0.1" & <"4.0.0"} - "mirage-console-unix" {>="2.2.0" & <"3.0.0"} - "mirage-logs" {>="0.3.0" & <"0.4.0"} - "mirage-runtime" {>="3.5.0" & <"3.6.0"} - "mirage-types" {>="3.5.0" & <"3.6.0"} - "mirage-types-lwt" {>="3.5.0" & <"3.6.0"} - "mirage-unix" {>="3.1.0" & <"4.0.0"} - "nocrypto" {>="0.5.4" & <"0.6.0"} - "ocaml" {build & >="4.04.2"} - "ocamlbuild" {build} - "ocamlfind" {build} - "tcpip" {>="3.7.1" & <"3.8.0"} -] -maintainer: "dummy" -authors: "dummy" -homepage: "dummy" -bug-reports: "dummy" -build: [ "mirage" "build" ] -synopsis: "This is a dummy" diff --git a/examples/mirage/myocamlbuild.ml b/examples/mirage/myocamlbuild.ml deleted file mode 100644 index e69de29b..00000000