1
0

cffi.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* vim: set expandtab ts=4 sw=4: */
  2. /*
  3. * You may redistribute this program and/or modify it under the terms of
  4. * the GNU General Public License as published by the Free Software Foundation,
  5. * either version 3 of the License, or (at your option) any later version.
  6. *
  7. * This program is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. * GNU General Public License for more details.
  11. *
  12. * You should have received a copy of the GNU General Public License
  13. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  14. */
  15. // This file is used to generate src/cffi.rs using bindgen
  16. #include "benc/String.h"
  17. #include "memory/Allocator.h"
  18. #include "memory/MallocAllocator.h"
  19. #include "interface/Iface.h"
  20. #include "interface/test/RustIface_test.h"
  21. #include "crypto/CryptoAuth.h"
  22. #include "crypto/CryptoAuth_pvt.h" // encryptRndNonce
  23. #include "crypto/random/test/DeterminentRandomSeed.h"
  24. #include "util/platform/Sockaddr.h"
  25. #include "util/version/Version.h"
  26. enum RBindings_Version {
  27. RBindings_Version_CurrentProtocol = Version_CURRENT_PROTOCOL,
  28. };
  29. // This structure is guaranteed to be present in the generated rust code
  30. // Also all functions in the above headers will be present.
  31. // Any types which are not transitively included in either this structure
  32. // or in one of the functions will not be generated. This prevents generating
  33. // a bunch of platform-specific trash like uint_fast8_t etc.
  34. struct RBindings_Whitelist {
  35. Allocator_t a;
  36. Iface_t b;
  37. enum CryptoAuth_addUser_Res c;
  38. Message_t d;
  39. String_t e;
  40. Log_t* f;
  41. enum RBindings_Version g;
  42. };