rust-regen.sh 608 B

12345678910111213141516171819202122232425262728
  1. #!/bin/sh
  2. #
  3. # Copyright (C) 2021-2023 Red Hat, Inc. All rights reserved.
  4. #
  5. # Authors: Christine Caulfield <ccaulfie@redhat.com>
  6. # Fabio M. Di Nitto <fabbione@kronosnet.org>
  7. #
  8. # This software licensed under GPL-2.0+
  9. #
  10. #
  11. # Regerate the FFI bindings in src/sys from the current headers
  12. #
  13. bindgen="$1"
  14. srcheader="$2"
  15. dstrs="$3"
  16. filter="$4"
  17. shift 4
  18. "$bindgen" \
  19. --no-prepend-enum-name \
  20. --no-layout-tests \
  21. --no-doc-comments \
  22. --generate functions,types \
  23. --fit-macro-constant-types \
  24. --allowlist-type="^(${filter}_.*)" \
  25. --allowlist-function="^(${filter}_.*)" \
  26. "$srcheader" -o "$dstrs" "$@"