Pure Erlang implementation of 9p2000 protocol
filesystem fs 9p2000 erlang 9p
Erlang 96.3%
Nix 3.2%
Other 0.5%
27 1 1

Clone this repository

https://tangled.org/hauleth.dev/e9p
git@knot.hauleth.dev:hauleth.dev/e9p

For self-hosted knots, clone URLs may differ based on your setup.

README.md

e9p#

Implementation of 9p2000 file protocol in Erlang

Goals#

  • Message parsing
  • Client implementation
    • Establishing connection
    • Tree walking
    • IO server implementation for reading/writing files
    • File/directory creation
    • File/directory deletion
    • File stats
  • Server implementation
    • Establishing connection
    • Tree walking
    • File/directory creation
    • File/directory deletion
    • File stats
    • Customisable FS implementations

Example FS#

  • UnixFs - which will simply allow accessing some "real" directory in system FS. WIP: Implemented directory traversal, file writing/reading/deletion, but so far no file nor directory creation.
  • ErlProcFS - which will expose Erlang process tree and other internal data via API similar to procfs from Linux. Read-only for the time of being.

Reasoning#

I want to implement procfs-like API for Erlang to allow non-Erlang-fluent operators to navigate through Erlang processes. There is something similar implemented in fuserl, but that uses libfuse, which is NIF implemented. That requires compilation of native code and can be problematic wrt cross compilation and stuff. On the other hand 9p2000 is network protocol that can be implemented fully in Erlang, thus do not require any additional tools or compilation steps. It can also be accessed remotely if needed.

License#

Apache-2.0 with exception to PropEr tests which are GPL-3.0-only. This do not affect possibility to run this project as dependency of non-GPL projects, as GPL code is not used in runtime. Unfortunately that workaround is needed due to PropEr licensing.