GithubHelp home page GithubHelp logo

goreleaser-cross-example's Introduction

Brief

Usage example for goreleaser-cross

Whats inside

Demonstrates how to cross-compile Go project with CGO dependencies. Project depends on C/C++ libraries libftdi1, libusb-1.0, opencv4.

  • Executable will try to detect FTDI 2232 boards with VID: 0x0403 and PID: 0x6010 and open channel 0.
  • Then it lists serial number of all detected boards.
  • Afterwards it will try to open camera with OpenCV and take test picture into your terminal

Example of output

version: 0.0.4
detecting ftdi devices
detected 1 device(s) with vid: 0x0403 pid: 0x6010:
    [0] serial: FT4AYSJC
detecting camera using opencv...
show your awesome face and smile ๐Ÿ˜บ
capturing in 3..2..1
<your picture is here>
you've been captured!!!!

Cross-compiles for targets:

  • Darwin/amd64
  • Linux/armhf (Raspberry Pi 4 aka RPI4)
  • Linux/amd64 (should not be any issue to add this example)

This example is based on real working solution where Macbook is dev machine and RPI4 is end target. Cross-compilation is set for both darwin and linux to ensure nothing is broken with new commits

Sysroot

Sysroots are located in separate repo and added as submodule to current repo

  • Darwin sysroot is created by simply copying libraries from homebrew
  • Linux sysroot is created from RPI4 using this script

goreleaser-cross-example's People

Contributors

jalitha avatar troian avatar

Watchers

 avatar

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.