NuxiNL / cloudlibc

CloudABI's standard C library
BSD 2-Clause "Simplified" License
296 stars 17 forks source link

Supporting DragonflyBSD #1

Open jayrulez opened 8 years ago

jayrulez commented 8 years ago

How feasible would it be to support CloudABI on DragonflyBSD?

Are there any prerequisites to supporting CloudABI that DragonflyBSD currently lacks?

What sort of changes would need to be made to accomplish this?

EdSchouten commented 8 years ago

Hi Robert,

I'd say that adding CloudABI support to DragonflyBSD would be feasible. Like FreeBSD, DragonflyBSD should have a layer in the kernel to allow for alternative executable formats (e.g., COMPAT_LINUX). CloudABI support can simply be added by adding a module that registers such an alternative format.

On FreeBSD we reuse Capsicum bits that are already present in the kernel. That doesn't mean that DragonflyBSD needs to support all of Capsicum. In particular, we need support for permission bitmasks on file descriptors, some changes to namei() to restrict lookups to paths beneath file descriptors and process descriptors. For NetBSD I was able to implement these features separately.

On the ports side, DragonflyBSD already seems to have pulled in the CloudABI toolchain packages, which is nice. It should already be possible to compile CloudABI binaries on DragonflyBSD.

Right now my focus is on upstreaming CloudABI support to FreeBSD. Once that's done, I am likely going to focus on Linux and NetBSD first, so my hope is that someone steps up to add support to DragonflyBSD. Be sure to get in touch in case you're interested in working on this, as I would like to help out. There's also an IRC channel, #cloudabi on EFnet where some folks hang out.