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

Re: OS.*



The OS module is best thought of as analogous to the Cohttp.IO functor.  It's 
the minimal support needed for building portable applications that might run on 
several backends.

In the longer-term, it makes complete sense to break up OS into a set of 
functors rather than the current pack hack, and to get Mirari to instantiate 
the application by applying the correct backend.

However, the Xen-specific OS functions can and should be pulled out from OS, 
leaving only the portable aliases (e.g. OS.Time) that *use* the Xen functions 
but also have an implementation under UNIX.

I think it might well be time to resurrect the Javascript backend just to give 
us a clearly different third (and a day or two's work, so not too complex) 
target that will never be compatible with Xen.  I'll take a shot at this when 
back in Cambridge next week.

-anil

On 16 Aug 2013, at 07:30, Vincent Bernardoff <vb@xxxxxxxxxxxxxx> wrote:

> Hi,
> 
> Just a little opinion poll who really likes having mirage-platform modules 
> packed under OS.* ? Personally it makes the packaging of my library more 
> complicated (because for example, xenctrl have a Eventchn module, whereas in 
> Mirage it is OS.Eventchn, so I can't just use Eventchn in my library and be 
> able to recompile between backends without code changes) and I don't like 
> very much the packing feature overall.
> 
> If pack is going to be used for Mirage, do anybody see a not too annoying or 
> ugly solution to my problem ?
> 
> A solution could be to functorize my library over all Xen-things that it 
> uses. But it would imply that we write the signature of all Xen related 
> packages explicitely (module type S = sig end). That would certainly work.
> 
> The drawback of this approach is that it makes my library a functor, which 
> needs to be instanciated, and so on.
> 
> Removing the OS.* thing would make it work out of the box.
> 
> 
> Dave pointed out that the mirage-unix package exports a OS.* namespace as 
> well. But certainly, the UNIX version of Xen libs would not exist behind OS 
> would they ?
> 
> 
> Cheers,
> 
> Vincent
> 




  • Follow-Ups:
  • References:
    • OS.*
      • From: Vincent Bernardoff

 


Rackspace

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