mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
f8ef7c65d1
This gives an indication in the log that Tor was built with Rust support, as well as laying some groundwork for further string-returning APIs to be converted to Rust
29 lines
611 B
C
29 lines
611 B
C
/* Copyright (c) 2017, The Tor Project, Inc. */
|
|
/* See LICENSE for licensing information */
|
|
|
|
/**
|
|
* \file rust_compat.h
|
|
* \brief Headers for rust_compat.c
|
|
**/
|
|
|
|
#ifndef TOR_RUST_COMPAT_H
|
|
#define TOR_RUST_COMPAT_H
|
|
|
|
#include "torint.h"
|
|
|
|
/**
|
|
* Strings allocated in Rust must be freed from Rust code again. Let's make
|
|
* it less likely to accidentally mess up and call tor_free() on it, because
|
|
* currently it'll just work but might break at any time.
|
|
*/
|
|
typedef uintptr_t rust_str_t;
|
|
|
|
void rust_str_free(rust_str_t);
|
|
|
|
const char *rust_str_get(const rust_str_t);
|
|
|
|
rust_str_t rust_welcome_string(void);
|
|
|
|
#endif
|
|
|