Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Executable depends on libfuse3.so #310

Open
nrath-js opened this issue Nov 1, 2024 · 3 comments
Open

Executable depends on libfuse3.so #310

nrath-js opened this issue Nov 1, 2024 · 3 comments

Comments

@nrath-js
Copy link

nrath-js commented Nov 1, 2024

Building the example "hello.rs" filesystem, I am getting an executable that is dynamically linked against libfuse3:

❯ ldd target/debug/hello
	linux-vdso.so.1 (0x00007ffc6355e000)
	libfuse3.so.3 => /lib64/libfuse3.so.3 (0x00007f85be344000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f85bd600000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007f85bd200000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007f85bce00000)
	libc.so.6 => /lib64/libc.so.6 (0x00007f85bca00000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f85be000000)

My understanding was that fuser is a pure-rust implementation and only requires libfuse for the "fusermount" command. Why is there a runtime dependency?

I used the following Cargo.toml:

[package]
name = "hello"
version = "0.1.0"
edition = "2021"

[dependencies]
fuser = "0.7"
libc = "0.2.51"
log = "0.4.6"
env_logger = "0.11.3"
clap = { version = "4.4", features = ["cargo", "derive"] }
@cberner
Copy link
Owner

cberner commented Nov 2, 2024

By default it builds against libfuse. You have to disable the default features

@nrath-js
Copy link
Author

nrath-js commented Nov 4, 2024

Thanks for the quick response! Sorry for being unclear, my question is: when using default features, what is libfuse used for?

@vdudouyt
Copy link

vdudouyt commented Nov 8, 2024

There's an answer regarding that topic in README.md:

Except for a single setup (mount) function call and a final teardown (umount) function call to libfuse, everything runs in Rust, and on Linux these calls to libfuse are optional. They can be removed by building without the "libfuse" feature flag.

It's really appreciated if we could get rid from libfuse dependencies on Macs as well, though.

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

No branches or pull requests

3 participants