rustui / hid

A cross platform plugin for communicating with HID devices for Flutter applications.
11 stars 7 forks source link

Missing Linux implementation #2

Closed DavBfr closed 2 years ago

DavBfr commented 2 years ago

The same as macOS should work.

rustui commented 2 years ago

You should be right, the size of wchar_t is same on Linux and macOS. But I don't have a Linux machine to test that it really works, so code contributions are welcome.

DavBfr commented 2 years ago

Can you provide your scripts to generate the generated_bindings.dart files? I'll do the Linux.

rustui commented 2 years ago

Thanks! I forgot to add the build script to pubspec.yaml. It should be this:

ffigen:
  name: "Api"
  output: "lib/generated_bindings.dart"
  compiler-opts:
    - "-Wno-nullability-completeness"
  functions:
    rename:
      "hid_(.*)": "$1"
  headers:
    entry-points:
      - "hidapi.h"
    include-directives:
      - "hidapi.h"

hidapi.h ffigen

rustui commented 2 years ago

3