Skip to content
This repository was archived by the owner on Feb 26, 2020. It is now read-only.

Conversation

niklasad1
Copy link

@niklasad1 niklasad1 commented Feb 22, 2019

  • Adds a git submodule eudev to build from source
  • Add Pierre's magic-hack for android
  • Needs some additional dependencies: autotools-dev automake autoconf libtool gperf xsltproc

Note, that this will increase the build-time and it is slow on my machine

Tested by:

  1. native Linux (ubuntu)
cargo build --example lshid
ldd target/debug/examples/lshid | grep udev | wc -l
0
./target/debug/examples/lshid                                                                     
Printing all available hid devices.
HidDeviceInfo {
    path: "/dev/hidraw2",
    vendor_id: 1356,
    product_id: 2968,
    serial_number: Some(
        ""
    ),
    release_number: 38288,
    manufacturer_string: None,
    product_string: Some(
        "h.ear (MDR-100ABN)"
    ),
    usage_page: 0,
    usage: 0,
    interface_number: 0
}
  1. cross-compile android,
cargo build --example lshid --target armv7-linux-androideabi
arm-linux-androideabi-readelf --dynamic target/debug/examples/lshid | grep libudev | wc -l
0

This should be tested on more platforms and linux flavors!

@parity-cla-bot
Copy link

It looks like @niklasad1 signed our Contributor License Agreement. 👍

Many thanks,

Parity Technologies CLA Bot

@niklasad1 niklasad1 requested a review from tomaka February 22, 2019 12:42
@niklasad1 niklasad1 changed the title Statically link libudev Statically link libudev for Linux only Feb 22, 2019
@niklasad1 niklasad1 changed the title Statically link libudev for Linux only Statically link libudev for Linux Feb 22, 2019
// along with hidapi_rust. If not, see <http://www.gnu.org/licenses/>.
// *************************************************************************

extern crate autotools;
Copy link
Author

@niklasad1 niklasad1 Feb 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is suppose to be cross-platform and will use mingw-make on Windows!

@niklasad1 niklasad1 force-pushed the statically-link-udev branch from fc40b1a to d629f66 Compare February 23, 2019 00:36
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants