rust: Remove Rust support from tree

Closes #40469

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet
2021-09-14 11:03:00 -04:00
parent c3e50f0fde
commit ae9042abbf
69 changed files with 40 additions and 5984 deletions
-1
View File
@@ -28,7 +28,6 @@ LIBTOR_APP_A_SOURCES += \
src/core/or/orconn_event.c \
src/core/or/policies.c \
src/core/or/protover.c \
src/core/or/protover_rust.c \
src/core/or/reasons.c \
src/core/or/relay.c \
src/core/or/scheduler.c \
-4
View File
@@ -28,8 +28,6 @@
#include "core/or/versions.h"
#include "lib/tls/tortls.h"
#ifndef HAVE_RUST
static const smartlist_t *get_supported_protocol_list(void);
static int protocol_list_contains(const smartlist_t *protos,
protocol_type_t pr, uint32_t ver);
@@ -752,5 +750,3 @@ protover_free_all(void)
supported_protocol_list = NULL;
}
}
#endif /* !defined(HAVE_RUST) */
+2 -2
View File
@@ -99,13 +99,13 @@ typedef struct proto_entry_t {
uint64_t bitmask;
} proto_entry_t;
#if !defined(HAVE_RUST) && defined(TOR_UNIT_TESTS)
#if defined(TOR_UNIT_TESTS)
STATIC struct smartlist_t *parse_protocol_list(const char *s);
STATIC char *encode_protocol_list(const struct smartlist_t *sl);
STATIC const char *protocol_type_to_str(protocol_type_t pr);
STATIC int str_to_protocol_type(const char *s, protocol_type_t *pr_out);
STATIC void proto_entry_free_(proto_entry_t *entry);
#endif /* !defined(HAVE_RUST) && defined(TOR_UNIT_TESTS) */
#endif /* defined(TOR_UNIT_TESTS) */
#define proto_entry_free(entry) \
FREE_AND_NULL(proto_entry_t, proto_entry_free_, (entry))
-34
View File
@@ -1,34 +0,0 @@
/* Copyright (c) 2016-2021, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/*
* \file protover_rust.c
* \brief Provide a C wrapper for functions exposed in /src/rust/protover,
* and safe translation/handling between the Rust/C boundary.
*/
#include "core/or/or.h"
#include "core/or/protover.h"
#ifdef HAVE_RUST
/* Define for compatibility, used in main.c */
void
protover_free_all(void)
{
}
int protover_contains_long_protocol_names_(const char *s);
/**
* Return true if the unparsed protover in <b>s</b> would contain a protocol
* name longer than MAX_PROTOCOL_NAME_LENGTH, and false otherwise.
*/
bool
protover_list_is_invalid(const char *s)
{
return protover_contains_long_protocol_names_(s) != 0;
}
#endif /* defined(HAVE_RUST) */