Skip to content

Added some FUSE functionalities for macOS#290

Open
tiberiu04 wants to merge 2 commits into
xoriors:mainfrom
tiberiu04:main
Open

Added some FUSE functionalities for macOS#290
tiberiu04 wants to merge 2 commits into
xoriors:mainfrom
tiberiu04:main

Conversation

@tiberiu04
Copy link
Copy Markdown

@tiberiu04 tiberiu04 commented Apr 26, 2025

Title

Add macOS FUSE support using fuser crate #4


Description

This PR adds initial support for macOS by replacing the previous dummy implementation with a real FUSE mount logic using the fuser crate. This allows the rencfs encrypted file system to be mounted and used on macOS, similar to how it works on Linux.

  • Introduced conditional compilation in dummy.rs for macOS.
  • Implemented MountPointImpl and MountHandleInnerImpl using fuser on macOS.
  • Ensured compatibility with the existing Linux structure without affecting other platforms.

Fixes #4


Type of change

  • Feature enhancement (adds macOS support, non-breaking change)

Checklist:

  • I have performed a self-review of my code
  • I have tested my code on different platforms (if applicable)
  • I have commented my code, particularly in hard-to-understand areas
  • I have added necessary documentation (if appropriate)
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Additional Context

  • This is the first step towards full macOS support.
  • The DummyFS is used temporarily; next step would be integrating EncryptedFs as a real Filesystem implementation for macOS.
  • Requires testing on a real macOS environment with macFUSE installed.

Copilot AI review requested due to automatic review settings April 26, 2025 07:38
@tiberiu04 tiberiu04 requested a review from radumarias as a code owner April 26, 2025 07:38
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces initial macOS support for rencfs FUSE mounting by leveraging the fuser crate instead of a dummy implementation.

  • Implements macOS-specific mount logic (macos_impl module) using the fuser crate.
  • Provides conditional compilation to separate macOS from non-macOS implementations.
  • Updates Cargo.toml to include the fuser dependency for macOS.

Reviewed Changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

File Description
src/mount/dummy.rs Added macOS-specific mount implementation using the fuser crate.
Cargo.toml Added dependency on the fuser crate for macOS target OS.
Files not reviewed (2)
  • data/contents/1/hash/$.: Language not supported
  • data/contents/1/ls/$.: Language not supported
Comments suppressed due to low confidence (2)

src/mount/dummy.rs:104

  • [nitpick] Consider renaming 'DummyFS' to a name that better conveys its temporary or placeholder nature for future production usage, to reduce any potential confusion during debugging.
struct DummyFS;

src/mount/dummy.rs:49

  • New macOS FUSE mounting functionality introduced here lacks automated tests. Please consider adding tests to cover both mounting and unmounting scenarios.
async fn mount(self) -> FsResult<crate::mount::MountHandle> {

Copy link
Copy Markdown
Author

@tiberiu04 tiberiu04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When building fuser was causing errors because I added the tokio feature. I removed it and now the build works just fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FUSE support for macOS

2 participants