compat_rust.h 611 B

12345678910111213141516171819202122232425262728
  1. /* Copyright (c) 2017, The Tor Project, Inc. */
  2. /* See LICENSE for licensing information */
  3. /**
  4. * \file rust_compat.h
  5. * \brief Headers for rust_compat.c
  6. **/
  7. #ifndef TOR_RUST_COMPAT_H
  8. #define TOR_RUST_COMPAT_H
  9. #include "torint.h"
  10. /**
  11. * Strings allocated in Rust must be freed from Rust code again. Let's make
  12. * it less likely to accidentally mess up and call tor_free() on it, because
  13. * currently it'll just work but might break at any time.
  14. */
  15. typedef uintptr_t rust_str_t;
  16. void rust_str_free(rust_str_t);
  17. const char *rust_str_get(const rust_str_t);
  18. rust_str_t rust_welcome_string(void);
  19. #endif