fuse-friends / fuse-native

Multithreaded FUSE bindings for Node JS.
202 stars 29 forks source link

Windows Support Possible? #3

Open roobscoob opened 4 years ago

roobscoob commented 4 years ago

Hi, I'm wondering if Windows support is possible, with something like Dokany?

andrewosh commented 4 years ago

Hey @roobscoob, Windows support is probably possible (using Dokany or winfsp), but we've chosen not to prioritize it immediately just due to time cost.

Assuming one of those libraries supports the multithreaded libfuse API we're using, there shouldn't be any blockers. If you want Windows support immediately and you don't care as much about multithreading, take a look at the fuse-bindings module, which is what we're building off of here.

roobscoob commented 4 years ago

I already use (and love ❤️) the fuse-bindings module! I was looking forward to multithreading, but I'm not making any scale projects, just a hobbyist, so no worries about it. Thank you!

131 commented 4 years ago

+1 for a winfsp fuse-friends driver ! I'm using a fuse-bindings fork backed on winfsp, working fine, but it's unsupported and performances are'nt there.

raymond-h commented 4 years ago

Hello. I started working on adding Windows support for this module. My fork can be found at https://github.com/raymond-h/fuse-native with another relevant fork and module found at https://github.com/raymond-h/fuse-shared-library and https://github.com/raymond-h/fuse-shared-library-win32 respectively.

The fork uses WinFsp and pthread4w (latter is prebuilt using vcpkg and bundled into the git repo of fuse-shared-library-win32). A few issues with it:

  1. I'm not sure about bundling WinFsp, because it seems the model is for users to manually install it themselves alongside whatever program they want to use (I imagine there may be issues with its kernel bits and pieces).
  2. WinFsp has a weird behavior of intercepting Ctrl-C for itself to trigger it to unmount everything, so example.js in this repo for example requires you to hit Ctrl-C twice to finally stop the program.
  3. While FUSE on MacOS and Linux requires the folder exists, WinFsp (even its FUSE compat) explicitly requires the folder does not exist. One solution would be to make sure all folders but the last one exist, possibly even deleting the last folder if it does exist.

Aside from these issues, I got all tests to pass (excluding the tests relying on the behavior mentioned in point 3 above) and example.js to work as expected.

131 commented 4 years ago

This looks great ! Can this work be merged ?

mafintosh commented 4 years ago

@raymond-h uhh cool! are there any major hurdles/complexities/downsides with winfsp?

We could potentially add it to this org if you want, with you as the maintainer, if this is something you want to help maintain nearterm.

d3lm commented 3 years ago

I would love to see Windows support as well, that would be amazing! Great work @raymond-h. Have you had a chance to fix / solve the issues / points you mentioned?

voxsoftware commented 3 years ago

any update about this? I work with this module on Linux perfect. I want also available on windows