Comments (2)
I like the idea, but I'm not sure if this is actually possible. It might not be able to asynchronously use the file descriptor to the kernel driver (see #80), I'm not sure about that.
On the other hand, rust-fuse is meant to encapsulate the kernel communication. I'm not sure how we could expose the fd and still keep a reasonable encapsulation of talking to the kernel driver.
from fuse-rs.
Instead of exposing the Fd, it might be possible to expose an opaque object implementing mio::Evented
. This would allow it to be used in mio as such :
let FUSE: Token = Token(0);
let poll = Poll::new()?;
let fuse_handle = fuse::mount_evented(fs, mountpoint, &[])?;
// Start listening for incoming connections
poll.register(&fuse_handle, FUSE, Ready::readable(),
PollOpt::edge())?;
// Other potential registers here
// Create storage for events
let mut events = Events::with_capacity(1024);
loop {
poll.poll(&mut events, None)?;
for event in events.iter() {
match event.token() {
FUSE => {
fuse_handle.handle_one_request();
}
// Handle other registers
_ => unreachable!(),
}
}
}
It's also possible to use it with tokio with tokio-core::reactor::PollEvented
from fuse-rs.
Related Issues (20)
- Is it Rust re-implementation of libfuse or just bindings to libfuse? HOT 5
- Feature request: Allow for configuring `max_write`
- Unknown FUSE opcode (39) HOT 8
- how to handle interrupted while setlk
- how to implement setlk and getlk rightly HOT 2
- Truncate? HOT 4
- Examples panic if not providing any mount point HOT 1
- New release? 0.3.1 is a bit outdated now HOT 8
- Can Channel.receive() be interrupted?
- destroy() not being called. HOT 2
- crate works with macFUSE 4.0.5 but needs build.rs update HOT 1
- Read file using inode number HOT 2
- fuse-rs does not compile on systems with libfuse3 HOT 1
- fuse-rs cannot build with target x86_64-unknown-linux-musl HOT 2
- hello.rs mount dir block HOT 1
- failed to run null example code
- How to use high-level Fuse API?
- Stale data (zeros) returned under specific circumstances HOT 1
- Is this library still maintained? HOT 1
- wrong version in readme
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fuse-rs.