cberner / fuser

Filesystem in Userspace (FUSE) for Rust
MIT License
836 stars 114 forks source link

Add pure rust mount on Macos #177

Closed kitterion closed 2 years ago

kitterion commented 3 years ago

Thankfully, only the kernel module part of macfuse is closed source. The libfuse part is still open source, which allowed to do this relatively easily. I do want to note, this is not exactly what libfuse does at this point in time, I did not accommodate the changes introduced in this commit. This should still work for reasons of backwards compatibility of libfuse itself.

boulos commented 3 years ago

Does the older osxfuse have the same setup?

kitterion commented 3 years ago

Does the older osxfuse have the same setup?

I looked into it and no, they don't have the same setup, specifically the program name and the env variables are different. Why, is there a need to support osxfuse?

boulos commented 3 years ago

If easy to support with just a "oh, the path is osxfuse in the old one", then it'd be worthwhile to cover more setups. Otherwise, meh.

kitterion commented 3 years ago

Regarding the tests, I'm not going to add them just yet, turns out they don't quite work with macfuse. When running tests locally they just hang, with or without my changes. Well it's not exactly the tests, it's the mount command that hangs with the only solution being to reboot the system.

cberner commented 3 years ago

Regarding the tests, I'm not going to add them just yet, turns out they don't quite work with macfuse. When running tests locally they just hang, with or without my changes. Well it's not exactly the tests, it's the mount command that hangs with the only solution being to reboot the system.

Interesting. Have you tried with osxfuse, if that's easy to make work? The current CI passes and it links against osxfuse & uses the osxfuse mount binary. It'd be nice to have tests for this functionality, so that it doesn't get broken in the future

cberner commented 2 years ago

I wasn't able to get this PR working, but wrote CI integration here: https://github.com/cberner/fuser/pull/192

Feel free to re-open if you figure out how to get this working