> On 1 Dec 2022, at 13:50, Edwin Torok <edvin.to...@citrix.com> wrote: > > Should we instead switch to using ctypes to generate these constants?
I would not advocate this. Ctypes is the kind of meta programming that is great when it works but hell if it does not and it adds more dependencies. I just had a discussion with Andrew about other tricks how to bring C constants to the ML side in order to decouple them. I’m using it in my Polly library - it might not be the solution for Xen but worth knowing. https://github.com/lindig/polly/blob/master/lib/polly_stubs.c#L23-L39 — C