MirageOS is a library operating system that constructs unikernels
CHANGES:
This release introduces a significant change in the Mirage tool by
splitting the definition of command-line arguments used at
configure-time and runtime. Command-line arguments used in the
configure script (also called 'configuration keys' and defined in
the Key
module) are essential during the setup of module
dependencies for the unikernel, allowing for a specialized
production of a unikernel for a given target runtime environment. On
the other hand, command-line arguments that the unikernel can use at
runtime (defined in the Runtime_arg
module) are useful for
customizing deployments without altering the dependencies of the
unikernels. (#1449, #1450, #1451, #1455 @samoht, review by @hannesm)
API changes:
~stage
parameter for Key.Arg.info
.Key
now define command-line arguments for the configuration tool.Runtime_arg
to define command-line arguments
for the unikernel.'Both
, users are now expected to create
two separated keys in that case (one for configure-time, one for runtime)
or decide if the key is useful at runtime of configure-time.Intended use of configuration keys (values of type 'a key
):
Intended use of command-line runtime arguments (values of type
a runtime_arg
):
key_gen.ml
is not generated anymore, so users cannot refer to
Key_gen.<key_name>
directy.
runtime_arg
and
registered on the device (using ~runtime_args
). The value of that
argument will then be passed as an extra parameter of the connect
function of that device.Key_gen.target
has been removed.Code migration:
(* in config.ml *)
let key =
let doc = Key.Arg.info ~doc:"A Key." ~stage:`Run [ "key" ] in
Key.(create "key" Arg.(opt_all ~stage:`Run string doc))
becomes:
(* in unikernel.ml *)
open Cmdliner
let key =
let doc = Arg.info ~doc:"A Key." [ "key" ] in
Arg.(value & opt_all string [] doc)
(* in unikernel.ml *)
let start _ =
let key = Key_gen.hello () in
...
becomes:
(* in config.ml *)
let hello = runtime_arg ~pos:__POS__ "Unikernel.hello"
let main = main ~runtime_args:[hello] ...
(* in unikernel.ml *)
let hello =
let open Cmdliner in
let doc = Arg.info ~doc:"How to say hello." [ "hello" ] in
Arg.(value & opt string "Hello World!" doc)
let start _ hello =
...
functoria
and functoria-runtime
are removed. The
respectives libraries became mirage.functoria
and mirage-runtime.functoria
(#1509, @samoht)Mirage.keys
is renamed to Mirage.runtime_args
(#1506, @samoht)Mirage.foreign. Use
Mirage.main` instead (#1505, @samoht)Mirage.main
does not take a ?extra_deps
parameter anymore
(#1505, @samoht)Mirage.connect
functions passed to create devices
(with Mirage.impl
) now take values of type 'a Mirage.code
instead
of string
. Value of type code
are created using a new Mirage.code
function, that takes ~pos:__POS__
as parameter. This is used to generate
better locations in the generated code, leading to better error messages
(#1504, @samoht)mirage describe
output (#1446 @samoht), add test (#1458 @samoht)Mirage.register
no longer have ?packages
and ?keys
arguments
(#1433, #1434 @hannesm)mirage build
subcommand, use dune build
in Makefile
(#1404 @hannesm), put --profile release
in Makefile instead of
dune-workspace (#1470 @hannesm)CHANGES:
CHANGES:
--help
(#1485 @hannesm)CHANGES:
CHANGES:
CHANGES:
CHANGES:
CHANGES:
CHANGES: