Signed-off-by: Matheus Sampaio Queiroga <srherobrine20@gmail.com>
90 lines
2.6 KiB
Markdown
90 lines
2.6 KiB
Markdown
# Cgofuse
|
|
|
|
Cgofuse is a cross-platform Go binding for FUSE (Filesystem in Userspace). It allows you to develop user-mode filesystems in Go that can be mounted on Linux, macOS, Windows, FreeBSD, NetBSD, and OpenBSD.
|
|
|
|
## Features
|
|
|
|
* **FUSE 3 Support**: Opt-in support for FUSE 3 features on Linux and FreeBSD by using the `fuse3` build tag.
|
|
* **Cross-Platform**: Works on a wide range of operating systems.
|
|
* **Linux**: FUSE 2 and FUSE 3.
|
|
* **macOS**: [macFUSE](https://macfuse.github.io/).
|
|
* **Windows**: [WinFsp](https://winfsp.dev/).
|
|
* **FreeBSD**: FUSE 2 and FUSE 3.
|
|
* **NetBSD**: `librefuse`.
|
|
* **OpenBSD**: FUSE.
|
|
|
|
| | **cgo** | **!cgo** | **FUSE** | **FUSE3** |
|
|
| :---------: | :------: | :------: | :------: | :-------: |
|
|
| **Windows** | - | - | Winfsp | |
|
|
| **macOS** | ✓ | | ✓ | |
|
|
| **Linux** | ✓ | | ✓ | ✓ |
|
|
| **FreeBSD** | ✓ | | ✓ | ✓ |
|
|
| **NetBSD** | ✓ | | ✓ | |
|
|
| **OpenBSD** | ✓ | | ✓ | |
|
|
|
|
|
|
## Prerequisites
|
|
|
|
Before using Cgofuse, you need to install Go, a C compiler, and the FUSE development libraries for your operating system.
|
|
|
|
### Linux
|
|
|
|
For FUSE 2:
|
|
- Debian/Ubuntu: `sudo apt-get install build-essential libfuse-dev`
|
|
- Fedora/RHEL: `sudo dnf install fuse-devel`
|
|
- Arch: `sudo pacman -Sy fuse`
|
|
|
|
For FUSE 3:
|
|
- Debian/Ubuntu: `sudo apt-get install build-essential libfuse3-dev`
|
|
- Fedora/RHEL: `sudo dnf install fuse3-devel`
|
|
- Arch: `sudo pacman -Sy fuse3`
|
|
|
|
### macOS
|
|
|
|
Install macFUSE and Command Line Tools.
|
|
|
|
`brew install --cask macfuse`
|
|
|
|
### Windows
|
|
|
|
Just need WinfSP installed, no require copiler, as DLL is used directly.
|
|
|
|
Manual installtion: [Download](https://winfsp.dev/rel/)
|
|
Winget: `winget install WinFsp.WinFsp`
|
|
|
|
### FreeBSD
|
|
|
|
- For FUSE 2: `pkg install fusefs-libs`
|
|
- For FUSE 3: `pkg install fusefs-libs3`
|
|
|
|
### NetBSD
|
|
|
|
- `pkgin install librefuse`
|
|
|
|
### OpenBSD
|
|
|
|
The `fuse` library is included in the base system, but you will need a compiler.
|
|
|
|
## Build fuse3
|
|
|
|
To use FUSE 3 on supported platforms (Linux, FreeBSD), use the `fuse3` build tag:
|
|
|
|
```bash
|
|
go build -tags fuse3
|
|
```
|
|
|
|
## Usage
|
|
|
|
get go module
|
|
|
|
`go get -u sirherobrine23.com.br/Sirherobrine23/cgofuse`
|
|
|
|
### fs (recomend)
|
|
|
|
`fs` implements and manages a file system based on the `os` and `syscall` go, it is much faster to implement because it is not necessary to use direction `fuse` or `winfsp`
|
|
|
|
## License
|
|
|
|
Cgofuse is licensed under the MIT License. See the `LICENSE` file for details.
|
|
|
|
Original author is Bill Zissimopoulos (Winfsp). |