Skip to content

Instantly share code, notes, and snippets.

@murachue
Last active September 30, 2017 15:19
Show Gist options
  • Save murachue/e8d84037c8da5e926cb0ca4e6c0608bc to your computer and use it in GitHub Desktop.
Save murachue/e8d84037c8da5e926cb0ca4e6c0608bc to your computer and use it in GitHub Desktop.
standalone rust-fuse hello example
$ cargo init --bin rust-fuse-hello
$ curl -Lv https://raw.githubusercontent.com/zargony/rust-fuse/0.3.0/examples/hello.rs -o rust-fuse-hello/src/main.rs
## note: newer version ( c9167ce06e8897fc3558a25b8f1685f39cd2dd98 or later ) may not compile with 0.3.0 due to https://github.com/zargony/rust-fuse/pull/84
$ cd rust-fuse-hello
$ $EDITOR Cargo.toml
## edit some...
$ cargo build
## target/debug/rust-fuse-hello is ready to run!
[package]
name = "rust-fuse-hello"
version = "0.1.0"
authors = ["hoge"]
[dependencies]
# absolutely you need it!!
fuse = "0.3.0"
# without time, you get "error[E0463]: can't find crate for `time`"
time = "0.1"
# without libc, you get many "use of unstable library feature 'libc': use `libc` from crates.io (see issue #27783)"
libc = "0.2"
# without env_logger, you get some "error: use of unstable library feature 'rustc_private': this crate is being loaded from the sysroot, and unstable location; did you mean to load this crate from crates.io via `Cargo.toml` instead? (see issue #27812)"
# version 0.4.3 from https://crates.io/crates/env_logger (2017/9/30 23:22)
env_logger = "0.4.3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment