hello.
i have ported/did 9p-Styx server to esp8266. for my os (freeRTOS+Lua, but not nodemcu). i tryed to port inferno (very stripped, but it wants too many RAM).
what this Styx port can do:
to start the Styx server, run it on the esp8266 board using remote com/tty terminal (using included pc-studio or any other): `thread.start( styx.loop )`.
or just select `Styx server` from menu on the board, but it should be a board like mine or compatible.
after this Styx should be mounted to the filesystem of Inferno-os: `mount -A tcp!<ip adress of esp8266 IoT boad with my os/styx port>!6701 /n`.
* to list of device's drivers (ex: `ls /n/dev`),
* to list of driver's functions (ex: `cat /n/dev/pwm`),
* to call a driver's function (ex: `echo ch_val -i 5 -n 0.4 > /n/dev/pwm`),
* to read the result of the function's call (ex: `cat /n/dev/pwm` immediatly after the call),
* to read a file/folder list from the fisical filesystem of the device (ex: `ls /n/fs/html/js`),
* to read/write/create files on the device's fisical filesystem (ex: `cat /n/fs/html/js/common.js` or `echo a Text > /n/fs/afile.txt`),
* to create new folders on the device's fisical filesystem (ex: `mkdir /n/fs/new_folder`),
* to remove files or folders from the fisical device's filesystem (ex: `rm /n/fs/html/a_file_or_folder`).
the path to the Styx module with all the necessary libraries here:
, but now it's pretty tied to the rest of the system. for example, Styx and Lua have a common description of drivers. more precisely, the Styx server simply reads the list of built-in modules of Lua. to add a driver to the `/dev` fs it's enough to add a new built-in module to Lua. (it's really easy. and, it seems to me, the best way).
PS: i think that IoT and the possibilities of inferno/Styx/9p are optimally suited to each other (maybe this was one of the main goals for development. as well as for QNX. styx/9p are very similar to Qnet). they are extremely useful to develop in the IoT direction.