Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

librclone: add support for mount commands

albertonyf54641511a0a
diff --git a/librclone/README.md b/librclone/README.md
index 63a2f7c73..77d3a86c5 100644
--- a/librclone/README.md
+++ b/librclone/README.md
@@ -13,7 +13,7 @@ The shims are a thin wrapper over the rclone RPC.
The implementation is based on cgo; to build it you need Go and a GCC compatible
C compiler (GCC or Clang). On Windows you can use the MinGW port of GCC,
-installing it via the [MSYS2](https://www.msys2.org) distribution is recommended
+e.g. by installing it in a [MSYS2](https://www.msys2.org) distribution
(make sure you install GCC in the classic mingw64 subsystem, the ucrt64 version
is not compatible with cgo).
@@ -37,6 +37,14 @@ You may add arguments `-ldflags -s` to make the library file smaller. This will
omit symbol table and debug information, reducing size by about 25% on Linux and
50% on Windows.
+Note that on macOS and Windows the mount functions will not be available unless
+you add additional argument `-tags cmount`. On Windows this also requires you to
+first install the third party utility [WinFsp](http://www.secfs.net/winfsp/),
+with the "Developer" feature selected, and to set environment variable CPATH
+pointing to the fuse include directory within the WinFsp installation
+(typically `C:\Program Files (x86)\WinFsp\inc\fuse`). See also the
+[mount](/commands/rclone_mount/#installing-on-windows) documentation.
+
### Documentation
For documentation see the Go documentation for:
diff --git a/librclone/librclone.go b/librclone/librclone.go
index 6b3674df3..5759acef5 100644
--- a/librclone/librclone.go
+++ b/librclone/librclone.go
@@ -38,6 +38,9 @@ import (
_ "github.com/rclone/rclone/fs/operations" // import operations/* rc commands
_ "github.com/rclone/rclone/fs/sync" // import sync/*
_ "github.com/rclone/rclone/lib/plugin" // import plugins
+ _ "github.com/rclone/rclone/cmd/mount" // import mount
+ _ "github.com/rclone/rclone/cmd/mount2" // import mount2
+ _ "github.com/rclone/rclone/cmd/cmount" // import cmount
)
// RcloneInitialize initializes rclone as a library