GithubHelp home page GithubHelp logo

Comments (12)

matthewrankin avatar matthewrankin commented on June 9, 2024

I've been able to successfully use truveris's gousb fork with the Homebrew installed libusb 1.0.

from gousb.

tobyjaguar avatar tobyjaguar commented on June 9, 2024

Any update on this? I just ran into the same thing...

I don't have a libusb-1.0 folder in /usr/local/lib
there is a libusb-1.0.dylib but no libusb-1.0

Any ideas here?

from gousb.

matthewrankin avatar matthewrankin commented on June 9, 2024

@tobyjaguar The last time I tried using this package with Homebrew, I had to use the truveris/gousb fork of kylelemons/gousb.

Since June 2015, I have been using gotmc/libusb, which I authored.

from gousb.

zagrodzki avatar zagrodzki commented on June 9, 2024

@matthewrankin @tobyjaguar would you mind running this command for me on your system that has the Homebrew's libusb installed:
pkg-config --cflags libusb-1.0
If that works and shows an include path (-I/some/path...), then it would be beneficial to gousb to include the headers with pkg-config instead.

from gousb.

matthewrankin avatar matthewrankin commented on June 9, 2024

Here's the pkg-config result from my MacBook Pro:

$ pkg-config --cflags libusb-1.0
-I/usr/local/Cellar/libusb/1.0.21/include/libusb-1.0

For USB with Go, I've been using https://github.com/gotmc/libusb, which has the following to work with Homebrew's libusb:

// #cgo pkg-config: libusb-1.0
// #include <libusb.h> 

Full disclosure: I'm the primary author of the https://github.com/gotmc/libusb library.

from gousb.

tobyjaguar avatar tobyjaguar commented on June 9, 2024

from gousb.

zagrodzki avatar zagrodzki commented on June 9, 2024

Thanks. I think it should be a straightforward change to gousb. I'll prepare a branch.

In the meantime, @matthewrankin: was that issue the the only reason to implement your own library? I certainly hope not :) But in general, if you have thoughts on making gousb more useful that you implemented in your libraries, please share them.

From my side, I'm now working on a streaming interface that would allow higher throughput than current implementation. As far as I can tell, none (few?) of the Go bindings for libusb allow that, that aren't thin wrappers around C libusb.

from gousb.

matthewrankin avatar matthewrankin commented on June 9, 2024

@zagrodzki No, that wasn't the only reason. There were some speed issues associated with connecting to a new USB device that caused me to implement the libusb library.

from gousb.

zagrodzki avatar zagrodzki commented on June 9, 2024

@matthewrankin would you mind elaborating on the speed issues? If it's an issue that I could fix in gousb, I'd be happy to take a shot.

from gousb.

zagrodzki avatar zagrodzki commented on June 9, 2024

#30 is out to address the include issue.

from gousb.

zagrodzki avatar zagrodzki commented on June 9, 2024

This should be now fixed.

from gousb.

matthewrankin avatar matthewrankin commented on June 9, 2024

@zagrodzki I'm not sure what the speed issue had been, but it appears to not be an issue at this point.

from gousb.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.