{"id":13509888,"url":"https://github.com/winfsp/cgofuse","last_synced_at":"2025-10-18T03:01:55.455Z","repository":{"id":45506314,"uuid":"88676531","full_name":"winfsp/cgofuse","owner":"winfsp","description":"Cross-platform FUSE library for Go - Works on Windows, macOS, Linux, FreeBSD, NetBSD, OpenBSD","archived":false,"fork":false,"pushed_at":"2023-06-26T07:39:22.000Z","size":331,"stargazers_count":488,"open_issues_count":21,"forks_count":82,"subscribers_count":18,"default_branch":"master","last_synced_at":"2024-04-10T10:20:35.027Z","etag":null,"topics":["cgo","cross-platform","fuse","go","golang"],"latest_commit_sha":null,"homepage":"https://winfsp.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/winfsp.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-04-18T22:38:22.000Z","updated_at":"2024-04-10T10:20:35.028Z","dependencies_parsed_at":"2023-02-16T08:15:16.601Z","dependency_job_id":"eb180747-1c38-4e4a-9ee9-bdc3dc74e4e1","html_url":"https://github.com/winfsp/cgofuse","commit_stats":{"total_commits":239,"total_committers":5,"mean_commits":47.8,"dds":0.03765690376569042,"last_synced_commit":"f87f5db493b56c5f4ebe482a1b7d02c7e5d572fa"},"previous_names":["billziss-gh/cgofuse"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winfsp%2Fcgofuse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winfsp%2Fcgofuse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winfsp%2Fcgofuse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/winfsp%2Fcgofuse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/winfsp","download_url":"https://codeload.github.com/winfsp/cgofuse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618262,"owners_count":21134200,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cgo","cross-platform","fuse","go","golang"],"created_at":"2024-08-01T02:01:16.080Z","updated_at":"2025-10-18T03:01:50.407Z","avatar_url":"https://github.com/winfsp.png","language":"Go","readme":"\u003cdiv align=\"center\"\u003e\n\n# Cross-platform FUSE library for Go\n\n\u003ca href=\"https://godoc.org/github.com/winfsp/cgofuse/fuse\"\u003e\n    \u003cimg src=\"https://godoc.org/github.com/winfsp/cgofuse/fuse?status.svg\"/\u003e\n\u003c/a\u003e\n\n_Cgofuse is a cross-platform FUSE library for Go. It is supported on multiple platforms and can be ported to any platform that has a FUSE implementation. It has [cgo](https://pkg.go.dev/cmd/cgo), [!cgo](https://go.dev/wiki/WindowsDLLs) (aka \"nocgo\") and [FUSE](https://github.com/libfuse/libfuse/tree/fuse-2.9.9) (aka \"FUSE2\"), [FUSE3](https://github.com/libfuse/libfuse) variants depending on the platform._\n\n|            |**cgo**     |**!cgo**    |**FUSE**    |**FUSE3**   |\n|:----------:|:----------:|:----------:|:----------:|:----------:|\n|**Windows** |\u0026#x2713;    |\u0026#x2713;    |\u0026#x2713;    |            |\n|**macOS**   |\u0026#x2713;    |            |\u0026#x2713;    |            |\n|**Linux**   |\u0026#x2713;    |            |\u0026#x2713;    |\u0026#x2713;    |\n|**FreeBSD** |\u0026#x2713;    |            |\u0026#x2713;    |\u0026#x2713;    |\n|**NetBSD**  |\u0026#x2713;    |            |\u0026#x2713;    |            |\n|**OpenBSD** |\u0026#x2713;    |            |\u0026#x2713;    |            |\n\n\u003c/div\u003e\n\n## How to build\n\n**Windows**\n- Prerequisites: [WinFsp](https://github.com/winfsp/winfsp), gcc (e.g. from [Mingw-builds](http://mingw-w64.org/doku.php/download))\n- Build **cgo**:\n    ```\n    \u003e set CPATH=C:\\Program Files (x86)\\WinFsp\\inc\\fuse\n    \u003e go install -v ./fuse ./examples/memfs\n    ```\n- Build **!cgo**:\n    ```\n    \u003e set CGO_ENABLED=0\n    \u003e go install -v ./fuse ./examples/memfs\n    ```\n\n**macOS**\n- Prerequisites: [macFUSE](https://macfuse.github.io/), [command line tools](https://developer.apple.com/library/content/technotes/tn2339/_index.html)\n- Build:\n    ```\n    $ go install -v ./fuse ./examples/memfs ./examples/passthrough\n    ```\n\n**Linux**\n- Prerequisites: libfuse-dev, libfuse3-dev, gcc\n- Build **FUSE**:\n    ```\n    $ go install -v ./fuse ./examples/memfs ./examples/passthrough\n    ```\n- Build **FUSE3**:\n    ```\n    $ go install -tags=fuse3 -v ./fuse ./examples/memfs ./examples/passthrough\n    ```\n\n**FreeBSD**\n- Prerequisites: fusefs-libs, fusefs-libs3\n- Build **FUSE**:\n    ```\n    $ go install -v ./fuse ./examples/memfs ./examples/passthrough\n    ```\n- Build **FUSE3**:\n    ```\n    $ go install -tags=fuse3 -v ./fuse ./examples/memfs ./examples/passthrough\n    ```\n- Note: You may also need the following in order to run FUSE file system. Commands must be run as root.\n    ```\n    $ vi /boot/loader.conf                      # add: fuse_load=\"YES\"\n    $ sysctl vfs.usermount=1                    # allow user mounts\n    $ pw usermod USERNAME -G operator           # allow user to open /dev/fuse\n    ```\n\n**NetBSD**\n- Prerequisites: NONE\n- Build:\n    ```\n    $ go install -v ./fuse ./examples/memfs ./examples/passthrough\n    ```\n- Note: You may also need the following in order to run FUSE file systems. Commands must be run as root.\n    ```\n    $ chmod go+rw /dev/puffs\n    $ sysctl -w vfs.generic.usermount=1\n    ```\n- Note: Support is experimental. There are known issues that stem from the differences in the NetBSD [librefuse](https://github.com/NetBSD/src/tree/bbc46b99bff565d75f55fb23b51eff511068b183/lib/librefuse) implementation from the reference [libfuse](https://github.com/libfuse/libfuse) implementation.\n\n**OpenBSD**\n- Prerequisites: NONE\n- Build:\n    ```\n    $ go install -v ./fuse ./examples/memfs ./examples/passthrough\n    ```\n- Note: OpenBSD 6 removed the `kern.usermount` option, which allowed non-root users to mount file systems [[link](https://undeadly.org/cgi?action=article\u0026sid=20160715125022\u0026mode=expanded\u0026count=0)]. Therefore you must be root in order to use FUSE and cgofuse.\n- Note: Support is experimental. There are known issues that stem from the differences in the OpenBSD [libfuse](https://github.com/openbsd/src/tree/dae5ffec5618b0b660e9064e3b0991bb4ab1b1e8/lib/libfuse) implementation from the reference [libfuse](https://github.com/libfuse/libfuse) implementation.\n\n\n## How to use\n\nUser 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`.\n\nThe full documentation is available at GoDoc.org: [package fuse](https://godoc.org/github.com/winfsp/cgofuse/fuse)\n\nThere are currently three example file systems:\n\n- [Hellofs](examples/hellofs/hellofs.go) is an extremely simple file system. Runs on all OS'es.\n- [Memfs](examples/memfs/memfs.go) is an in memory file system. Runs on all OS'es.\n- [Passthrough](examples/passthrough/passthrough.go) is a file system that passes all operations to the underlying file system. Runs on all OS'es except Windows.\n- [Notifyfs](examples/notifyfs/notifyfs.go) is a file system that can issue file change notifications. Runs on Windows only.\n\n## How it is tested\n\nThe following software is being used to test cgofuse.\n\n**Windows (cgo and !cgo)**\n- [winfsp-tests](https://github.com/winfsp/winfsp/tree/master/tst/winfsp-tests)\n- [fsx](https://github.com/billziss-gh/secfs.test/tree/master/fstools/src/fsx)\n\n**macOS**\n- [fstest](https://github.com/billziss-gh/secfs.test/tree/master/fstest/ntfs-3g-pjd-fstest-8af5670)\n- [fsx](https://github.com/billziss-gh/secfs.test/tree/master/fstools/src/fsx)\n\n**Linux**\n- [fstest](https://github.com/billziss-gh/secfs.test/tree/master/fstest/ntfs-3g-pjd-fstest-8af5670)\n- [fsx](https://github.com/billziss-gh/secfs.test/tree/master/fstools/src/fsx)\n\n**FreeBSD**\n- [fsx](https://github.com/billziss-gh/secfs.test/tree/master/fstools/src/fsx)\n","funding_links":[],"categories":["Go","golang"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinfsp%2Fcgofuse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinfsp%2Fcgofuse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinfsp%2Fcgofuse/lists"}