百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

cgofuse

> 数据库
开源

Go的跨平台 FUSE 库 - 在 Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD 上的工作

636 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Go的跨平台 FUSE 库 - 在 Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD 上的工作

How to build

Windows

  • Prerequisites: WinFsp, gcc (e.g. from Mingw-builds)
  • Build cgo:
    > set CPATH=C:\Program Files (x86)\WinFsp\inc\fuse
    > go install -v ./fuse ./examples/memfs
  • Build !cgo:
    > set CGO_ENABLED=0
    > go install -v ./fuse ./examples/memfs

macOS

  • Prerequisites: macFUSE, command line tools
  • Build:
    $ go install -v ./fuse ./examples/memfs ./examples/passthrough

Linux

  • Prerequisites: libfuse-dev, libfuse3-dev, gcc
  • Build FUSE:
    $ go install -v ./fuse ./examples/memfs ./examples/passthrough
  • Build FUSE3:
    $ go install -tags=fuse3 -v ./fuse ./examples/memfs ./examples/passthrough

FreeBSD

  • Prerequisites: fusefs-libs, fusefs-libs3
  • Build FUSE:
    $ go install -v ./fuse ./examples/memfs ./examples/passthrough
  • Build FUSE3:
    $ go install -tags=fuse3 -v ./fuse ./examples/memfs ./examples/passthrough
  • Note: You may also need the following in order to run FUSE file system. Commands must be run as root.
    $ vi /boot/loader.conf                      # add: fuse_load="YES"
    $ sysctl vfs.usermount=1                    # allow user mounts
    $ pw usermod USERNAME -G operator           # allow user to open /dev/fuse

NetBSD

  • Prerequisites: NONE
  • Build:
    $ go install -v ./fuse ./examples/memfs ./examples/passthrough
  • Note: You may also need the following in order to run FUSE file systems. Commands must be run as root.
    $ chmod go+rw /dev/puffs
    $ sysctl -w vfs.generic.usermount=1
  • Note: Support is experimental. There are known issues that stem from the differences in the NetBSD librefuse implementation from the reference libfuse implementation.

OpenBSD

  • Prerequisites: NONE
  • Build:
    $ go install -v ./fuse ./examples/memfs ./examples/passthrough
  • Note: OpenBSD 6 removed the kern.usermount option, which allowed non-root users to mount file systems [link]. Therefore you must be root in order to use FUSE and cgofuse.
  • Note: Support is experimental. There are known issues that stem from the differences in the OpenBSD libfuse implementation from the reference libfuse implementation.

How to use

User mode file systems are expected to implement fuse.FileSystemInterface. To make implementation simpler a file system can embed ("inherit") a fuse.FileSystemBase which provides default implementations for all operations. To mount a file system one must instantiate a fuse.FileSystemHost using fuse.NewFileSystemHost.

The full documentation is available at GoDoc.org: package fuse

There are currently three example file systems:

  • Hellofs is an extremely simple file system. Runs on all OS'es.
  • Memfs is an in memory file system. Runs on all OS'es.
  • Passthrough is a file system that passes all operations to the underlying file system. Runs on all OS'es except Windows.
  • Notifyfs is a file system that can issue file change notifications. Runs on Windows only.

How it is tested

The following software is being used to test cgofuse.

Windows (cgo and !cgo)

  • winfsp-tests
  • fsx

macOS

  • fstest
  • fsx

Linux

  • fstest
  • fsx

FreeBSD

  • fsx

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Gocgocross-platformfusego

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库