• Stars
    star
    1,062
  • Rank 43,462 (Top 0.9 %)
  • Language
    Rust
  • License
    MIT License
  • Created about 11 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Rust library for filesystems in userspace (FUSE)

Rust FUSE - Filesystem in Userspace

Crates.io Crates.io

About

fuse-rs is a Rust library crate for easy implementation of FUSE filesystems in userspace.

fuse-rs does not just provide bindings, it is a rewrite of the original FUSE C library to fully take advantage of Rust's architecture.

Documentation

Crate documentation

Details

A working FUSE filesystem consists of three parts:

  1. The kernel driver that registers as a filesystem and forwards operations into a communication channel to a userspace process that handles them.
  2. The userspace library (libfuse) that helps the userspace process to establish and run communication with the kernel driver.
  3. The userspace implementation that actually processes the filesystem operations.

The kernel driver is provided by the FUSE project, the userspace implementation needs to be provided by the developer. fuse-rs provides a replacement for the libfuse userspace library between these two. This way, a developer can fully take advantage of the Rust type interface and runtime features when building a FUSE filesystem in Rust.

Except for a single setup (mount) function call and a final teardown (unmount) function call to libfuse, everything runs in Rust.

Dependencies

FUSE must be installed to build or run programs that use fuse-rs (i.e. kernel driver and libraries. Some platforms may also require userland utils like fusermount). A default installation of FUSE is usually sufficient.

To build fuse-rs or any program that depends on it, pkg-config needs to be installed as well.

Linux

FUSE for Linux is available in most Linux distributions and usually called fuse. To install on a Debian based system:

sudo apt-get install fuse

Install on CentOS:

sudo yum install fuse

To build, FUSE libraries and headers are required. The package is usually called libfuse-dev or fuse-devel. Also pkg-config is required for locating libraries and headers.

sudo apt-get install libfuse-dev pkg-config
sudo yum install fuse-devel pkgconfig

macOS

Installer packages can be downloaded from the FUSE for macOS homepage.

To install using Homebrew:

brew cask install osxfuse

To install pkg-config (required for building only):

brew install pkg-config

FreeBSD

Install packages fusefs-libs and pkgconf.

pkg install fusefs-libs pkgconf

Usage

Put this in your Cargo.toml:

[dependencies]
fuse = "0.4"

To create a new filesystem, implement the trait fuse::Filesystem. See the documentation for details or the examples directory for some basic examples.

To Do

There's still a lot of stuff to be done. Feel free to contribute. See the list of issues on GitHub and search the source files for comments containing "TODO" or "FIXME" to see what's still missing.

Compatibility

Developed and tested on macOS. Tested under Linux, macOS and FreeBSD using stable, beta and nightly Rust versions (see CI for details).

Contribution

Fork, hack, submit pull request. Make sure to make it useful for the target audience, keep the project's philosophy and Rust coding standards in mind. For larger or essential changes, you may want to open an issue for discussion first. Also remember to update the Changelog if your changes are relevant to the users.

More Repositories

1

atom-language-rust

Rust language support in Atom - LOOKING FOR MAINTAINER, see #144
CoffeeScript
116
star
2

activerecord_symbolize

Deprecated. For a recent version, see https://github.com/nofxx/symbolize
Ruby
35
star
3

rails-i18n-updater

Rails plugin to automatically fetch and update Rails core translations in a Rails application
Ruby
12
star
4

rusty64

Emulator platform for 8-bit computers in Rust
Rust
8
star
5

advent-of-code-2015

Solutions to the Advent Of Code 2015 puzzles, written in Rust.
Rust
6
star
6

synacor-challenge

A solution to the Synacor programming challenge using Rust.
Rust
3
star
7

advent-of-code-2016

Solutions to the Advent Of Code 2016 puzzles, written in Rust.
Rust
3
star
8

appserver

Monit/Nginx/Unicorn application server configurator using deployment via git (simply git push applications to your server to deploy them).
Ruby
3
star
9

advent-of-code-2022

Solutions to the Advent Of Code 2022 puzzles, written in Rust
Rust
2
star
10

dotfiles

Zargony's dotfiles
Vim Script
2
star
11

touch-n-drink

Hardware and firmware for cashless payment device for cold drinks at the aeroclub at EDLH
Rust
2
star
12

advent-of-code-2020

Solutions to the Advent Of Code 2020 puzzles, written in Rust
Rust
1
star
13

css_naked

Rails plugin to disable stylesheets during the CSS Naked Day event.
Ruby
1
star
14

hypercube-m4

Configuration and hardware modifications for my customized HyperCube 3d printer (HyperCube M4 Variant)
GAP
1
star
15

udelta-hacks

Collection of hacks (and useful information) for the RepRap Β΅Delta 3d printer
C
1
star
16

led-nixie-clock

An attempt to design and build a LED Nixie Clock
1
star
17

advent-of-code-2021

Solutions to the Advent Of Code 2021 puzzles, written in Rust
Rust
1
star
18

advent-of-code-2019

Solutions to the Advent Of Code 2019 puzzles, written in Rust
Rust
1
star
19

kossel

Configuration and hardware modifications for my customized Kossel 3d printer
GAP
1
star
20

advent-of-code-2017

Solutions to the Advent Of Code 2017 puzzles, written in Rust
Rust
1
star