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

[MirageOS-devel] So you want to build C stubs...


  • To: mirageos-devel <mirageos-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: David Kaloper Meršinjak <dk505@xxxxxxxxx>
  • Date: Sun, 23 Oct 2016 22:36:48 +0100
  • Delivery-date: Sun, 23 Oct 2016 21:37:27 +0000
  • List-id: Developer list for MirageOS <mirageos-devel.lists.xenproject.org>

Hi all,

So I mostly switched from Oasis to Topkg. Which means that I had to
stare at the raw OCamlbuild for what it is, far longer than I
intended. And this got me increasingly tired of all the shenanigans
one has to play, to get even the regular stubs to build nicely, let
alone to do a Mirage lib.

After a couple of false starts, I made a little OCamlbuild plugin [1]
to do the right thing. It contains the incantations for linking
archives to stubs, usable anywhere, it adds pkg-config support, and it
can build Mirage projects hands-free [2].

I tested it by deleting a bunch of myocamlbuild code from a bunch of
random projects, and adjusting their _tags. Surprisingly, the ruse
seems to work.

Stuff like static Ctypes support is on the table, but as future work.
I'd like to get this out of the door.

Last-minute feedback is welcome.


Best,
David

[1] https://pqwy.github.io/ocb-stubblr/doc/Ocb_stubblr.html
[2] https://pqwy.github.io/ocb-stubblr/doc/Ocb_stubblr.html#2_Mirage

_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://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®.