Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exposing filesystem API #23

Open
derekparker opened this issue Jun 23, 2016 · 3 comments
Open

Exposing filesystem API #23

derekparker opened this issue Jun 23, 2016 · 3 comments

Comments

@derekparker
Copy link

Neat idea!

Are there any plans for (or does this already exist) to add a filesystem API similar to acme? It would be great to interact with the editor via an exported filesystem (like acme), that way plugins can be language agnostic, and need only to have the ability to manipulate files to interact with the editor.

@driusan
Copy link
Owner

driusan commented Jun 23, 2016

You're not the first person to suggest it, so I think there's definitely demand for it. The main problem is I can't think of any good cross-platform way to expose things via the filesystem (I suppose I should look into how acme in plan9ports does it, but even then p9p doesn't work under every OS that Go supports (such as Windows.))

I could probably hack something together with named pipes on UNIX-like systems with a fallback of just polling plain-text files on systems that don't support it, but that would get pretty ugly pretty quickly.

What might me more feasible and only slightly more difficult to work with in most modern languages is a RESTful API plugin based on net/http, which would make it easier to write a non-Go fuse filesystem or 9p filesystem which talks to the REST plugin, but that hasn't happened yet, mostly because my main priority is to get the functionality I still miss from vim implemented.

P.S. Thank you for writing delve!

@josephholsten
Copy link
Contributor

fuse is the closest thing to a standard for this. a non-trivial fuse fs written in go is part of camlistore: https://github.com/camlistore/camlistore/tree/master/pkg/fs

@driusan
Copy link
Owner

driusan commented Mar 22, 2017

It may also be possible to use a pure Go 9p package for this.

(as far as I know, github.com/Harvey-OS/ninep is the most up-to-date 9p package.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants