rust-regen.sh 649 B

123456789101112131415161718192021222324252627282930
  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. --size_t-is-usize \
  19. --no-recursive-allowlist \
  20. --no-prepend-enum-name \
  21. --no-layout-tests \
  22. --no-doc-comments \
  23. --generate functions,types \
  24. --fit-macro-constant-types \
  25. --allowlist-var=$filter.* \
  26. --allowlist-type=.* \
  27. --allowlist-function=.* \
  28. $srcheader -o $dstrs "$@"