cberner / fuser

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

Build warnings due to undeclared features "libfuse2", "libfuse3" #311

Closed dannycjones closed 1 week ago

dannycjones commented 1 week ago

Hey! We currently maintain a forked version of fuser for our own use and are building on newer Rust versions (1.82).

From Rust v1.80, cfg values will be checked to ensure they match all known possible values. https://blog.rust-lang.org/2024/05/06/check-cfg.html

Fuser makes use of the features libfuse2 and libfuse3 when conditionally compiling code for each implementation of libfuse. This leads to a lot of warnings when building with newer versions of Rust.

I'd like to propose that we move this conditional logic to be a new cfg values (not feature) which we can declare so that Rust is aware of the possible values. Alternatively, the 'easy' option is to just declare libfuse2 and libfuse3 as features however this doesn't seem right, as these aren't meant to be customer-facing features.

I've created pull request https://github.com/cberner/fuser/pull/313 that implements this change, however I'm open to alternatives.