domingo, 16 de octubre de 2011

9p-srv: experimental devdraw for p9p

From the beginning, one of the goals of wsys was to replace all the system dependent code duplicated in several Plan 9 related projects. The unix version of wsys could already do this from Plan 9 (9vx or drawterm) and Inferno but, until now, there was no way to use wsys from p9p programs.

The problem with p9p is that it does not use common 9p devices. Instead, it uses a modified libdraw and the devdraw(1) program. There are versions of devdraw for x11 (x11-*.c) and several OS X systems (osx-*.c, cocoa-*.c). The file 9p-srv.c (included in the util/ directory of the wsys distribution) is an implementation of devdraw which makes use of 9pclient and wsys.

Compile 9p-srv.c and set the DEVDRAW env variable accordingly and wsys will take care of the windows of p9p applications too.

NOTE: 9p-srv is an experiment, even more than wsys is. It can fail and, anyway, it probably is not the best solution to the problem. It was an easy way to get the ball rolling, and it gives me more chances to test wsys.

devwsys is now wsys

Rio is a file server which provides virtual devices, but it is not called a device. Other file servers offer some other files which can be mounted on /dev, but they are not called devices either. P9p's devdraw is the exception, not the norm and, therefore, devwsys has been renamed to wsys.

For the moment, the code has not moved from its usual location:

There has been several improvements since the end of GSoC. Check the changelog.