aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/karalabe/hid/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/karalabe/hid/README.md')
-rw-r--r--vendor/github.com/karalabe/hid/README.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/vendor/github.com/karalabe/hid/README.md b/vendor/github.com/karalabe/hid/README.md
index 5c0213f3b..2851ffe42 100644
--- a/vendor/github.com/karalabe/hid/README.md
+++ b/vendor/github.com/karalabe/hid/README.md
@@ -24,6 +24,12 @@ and go-gettable.
Supported platforms at the moment are Linux, macOS and Windows (exclude constraints are also specified
for Android and iOS to allow smoother vendoring into cross platform projects).
+## Cross-compiling
+
+Using `go get` the embedded C library is compiled into the binary format of your host OS. Cross compiling to a different platform or architecture entails disabling CGO by default in Go, causing device enumeration `hid.Enumerate()` to yield no results.
+
+To cross compile a functional version of this library, you'll need to enable CGO during cross compilation via `CGO_ENABLED=1` and you'll need to install and set a cross compilation enabled C toolkit via `CC=your-cross-gcc`.
+
## Acknowledgements
Although the `hid` package is an implementation from scratch, it was heavily inspired by the existing