-
Notifications
You must be signed in to change notification settings - Fork 130
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
WIP: Modernize (continued) #126
base: master
Are you sure you want to change the base?
Conversation
Hi @zargony I'm new to Rust and would like to learn it, especially the async/await pattern. Edit: Do you actually need libfuse? |
Sadly I didn't get much time over christmas to work on fuse-rs. This branch is basically well prepared for async/await. It's still missing some essential functionality like the session loop (WIP in last commit) and the Directory reply type. But with the changes introduced in this branch, it should be pretty straight-forward to enable async/await by simply making most handler methods async. One problem though is, that we can't have async methods in traits yet. To work around that we could either use the Unfortunately using async on the underlying kernel communication currently means that we have to choose a runtime that handles the RawFd communication. I'd rather be runtime agnostic in a library like fuse-rs but unfortunately that doesn't seem to be possible for now. I did some tests with You're right that libfuse is only used for mounting the filesystem. I'd like to remove that dependency as well (there has been talk about adding a feature flag for libfuse in another issues). Although this means that we either need to recreate a fuse_mount function in fuse-rs or rely on calling an external helper like |
For removing libfuse, do you have sources for fuse behaving differently on different systems? What are the known behaviours? I did look in to and the main code from libfuse is here: and the fallback to fusermount is here: At least for the main mounting mechanism, it ultimiately relinquishes mounting to libc::mount When I implemented it (I did it in the master branch by mistake), mounting the example filesystems worked and behaved normally. To completely remove libfuse as a dependency, we would need to reimplement fusermount in rust. I hope this research helps someone |
Next (second) step towards a more modern architecture and idiomatic interfaces. First step happened in #125.
FileAttr
andFileType
toll
module and improve docsRequest
andreply::*
typesFilesystem
trait (use return values)io::Read
andio::Read
traits)TODO:
reply::Directory
andreply::XAttr
AsyncRead
/AsyncWrite
, probably needs I/O reactor(?) and tokio dependency)