Rensselaer Center for Open Source Software

XCB versus Xlib

At the beginning of every project there's at least one fundamental implementation question that must be decided upon. For me, it was between implementing fenestra utilizing XCB or Xlib, both allow for interaction with the X server, but ultimately function in very important and subtle ways. Xlib is the venerable library that has been around since the mid 1980's, while XCB is a rather 'new' creation that has been around since 2001. XCB was designed to be simpler and lighter than Xlib as well as being more direct to the X11 protocol, therefore XCB is lower level than Xlib. XCB, unlike Xlib, splits the request/reply action to the server into two components, this makes XCB radically faster than Xlib, as Xlib blocks until the reply for a request is received.

Despite all the advantages going for XCB, I decided that I would use Xlib instead, simply because the documentation for Xlib far outstrips the documentation of XCB. For now, fenestra will be coded using C and Xlib, but that doesn't rule out a future for fenestra using XCB.