Skip to content
Prev 61976 / 63421 Next

Wayland Display Support in R Plot

Well, X11 is a protocol, not a device, either.

Wayland is a lot worse, since it doesn't really do much at all - the clients are fully responsible for drawing (doesn't even support remote connections).

Given that Wayland is essentially a "dumb" framebuffer, probably the easiest way would be to take Cairo and add a libwayland back-end. Cairo is already modular so it's relatively straight-forward to add a new back-end to it (I'd probably just copy xlib-backend.c and replace X11 calls with libwayland calls since the low-level design is the same).

However, that is limited only to devices, so you would still run R code in the shell (or other GUI that may or may not by Wayland-based). Given that Wayland is so minimal, you'd need some GUI library for anything beyond that - so you may was well just run a Wayland-based browser and be done with it saving you all the bother (oh, right, that's called RStudio ;)).

One package that may be worth adding Wayland backend to is rgl so you get OpenGL on Wayland - I'd simply re-write it to use GLFW so it works across all platforms and including Wayland.

Cheers,
Simon