rust-regen.sh 600 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. srcheader="$1"
  14. dstrs="$2"
  15. filter="$3"
  16. shift; shift; shift
  17. bindgen \
  18. --no-prepend-enum-name \
  19. --no-layout-tests \
  20. --no-doc-comments \
  21. --generate functions,types \
  22. --fit-macro-constant-types \
  23. --allowlist-var=$filter.* \
  24. --allowlist-type=.* \
  25. --allowlist-function=.* \
  26. $srcheader -o $dstrs "$@"