fuse-rs icon indicating copy to clipboard operation
fuse-rs copied to clipboard

Windows compilation?

Open nabijaczleweli opened this issue 9 years ago • 13 comments

The latest crates.io version (0.2.8) understandably fails to compile on Windows (log attached). Since Dokan provides a FUSE-compatible C API on Windows it would be nice to be able to use it with rust-fuse, too.

crates.io version compilation log

nabijaczleweli avatar Dec 10 '16 00:12 nabijaczleweli

I did hear about Dokan before, but I didn't know that it has a FUSE compatible API. Support for Windows would be a cool feature and shouldn't be too hard in this case.

zargony avatar Dec 10 '16 20:12 zargony

I am currently working on this. I don't think it'll be too hard to do, it's mostly about removing stuff like std::os::unix::OsStringExt, that don't exist on windows.

roblabla avatar Dec 16 '16 11:12 roblabla

There are multiple problems with regards to implementing this. First of all, rust-fuse implements the FUSE low-level API (which assumes the existance of INodes, etc...). This low-level API is really unix-specific, and doesn't reflect the reality of the NT OS. As such, both WinFSP and Dokany (which provide FUSE compat layers) support the low-level API, only the high-level APIs.

As such, I don't think trying to make rust-fuse work on windows is possible. It might be smarter to do a fuse high-level API binding, and have that be bound to the various native APIs.

roblabla avatar Dec 16 '16 14:12 roblabla

Ah, I see. Thanks for taking the time to find out how it works. I always wanted to create an additional layer of abstraction above the current inode based filesystem, just like the C libfuse provides (#75). Maybe such an interface could work with the current lowlevel interface on Unix and Dokan on Windows...

zargony avatar Dec 19 '16 16:12 zargony

That's what I'm thinking. fuse-mt (https://github.com/wfraser/fuse-mt/blob/master/src/fusemt.rs) seems to have an API that's pretty close to what we want (it converts any inodes to paths, broke up the setattr into multiple calls like in the FUSE high-level implementation, etc...).

roblabla avatar Dec 19 '16 16:12 roblabla

https://github.com/billziss-gh/winfsp/issues/94 is implementing the FUSE low-level API as a Windows driver.

leo60228 avatar May 22 '19 00:05 leo60228

Any new on this?

clouds56 avatar May 27 '19 04:05 clouds56

WinFSP seems to have active development on this, but I'm not sure if it's in a usable state.

leo60228 avatar May 27 '19 13:05 leo60228

It's finished now

zw5 avatar May 06 '20 20:05 zw5

I guess this library can only ever work either with https://github.com/billziss-gh/winfuse on Windows, due to Dokany not implementing the low-level FUSE API. Has anyone tried using this with winfuse?

tasn avatar Aug 03 '20 14:08 tasn