[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MirageOS-devel] command line arguments for unikernels



Le vendredi, 28 novembre 2014 Ã 17:48, Thomas Gazagnaire a Ãcrit :
> Assemblage has exactly the same "functionality": it first pass the 
> command-line to get some useful parameters (such as --include, which can help 
> with dynamic linking of the config file), then compile the config and dynlink 
> it, then extract a list of cmdliner terms and pass it to the command-line 
> interpreter. So `assemblage --help` will display only the help for the 
> features used in the config file. We had a quick chat with Nicolas and I 
> think a similar solution would work well for the mirage tool as well.

I was about to say that and the latest version of cmdliner helps with that, see 
the function Term.eval_peek_opts.  

In assemblage the whole thing is even exposed as a library so that assemblage 
drivers can reuse all that without having to bother:

https://github.com/dbuenzli/assemblage/blob/add38ef35f2cb8f585452f66f3695ab6ec7a417e/lib-driver/assemblage_driver.mli#L161

I will not say that it is not completely untricky, but I really like the idea 
that only what is really used in the configuration file gets documented in the 
help or parsed from the command line.

Best,

Daniel



_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
http://lists.xenproject.org/cgi-bin/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.