Open humphd opened 6 years ago
We shouldn't need to implement this from scratch, since we have existing code we can reuse/adapt. However, here's a good discussion of the protocol: http://plan9.bell-labs.com/magic/man2html/5/0intro.
Also, a good discussion of how you mount a 9p server in QEMU: https://wiki.qemu.org/Documentation/9psetup
Started work on this in a 9p
branch https://github.com/humphd/filer/tree/9p
I'm pretty close to having this done now, just need to refactor and clean up a bit.
9p-filer.js
is in my filer-9p-lastknowngood v86 branchThis is basically done, but I want to upstream the fixes to Filer and v86, and figure out what to land here. I'll leave this open while I do that.
I've sent a PR upstream to Filer, see https://github.com/filerjs/filer/pull/373
Depending on the outcome of our research in #26, we're going to need a way to mount the IndexedDB web filesystem (probably filer) in the browser VM for our OS/shell. Just about every example I see is using the Plan9 filesystem (9P) implementation for Linux v9fs.
The protocol is pretty slim, transport agnostic (we can easily do it over message passing between frames/windows/workers), and would map well onto our filesystem. There are also a number of existing JavaScript implementations, including (and in order of how well maintained they appear to be):
The goal would be to allow our VM (probably v86) to mount our filesystem over 9P into
/home
or the like, and work with the files and dirs as if they were in the VM.