//
// Syd: rock-solid application kernel
// src/utils/syd-tor.rs: Syd's SOCKS Proxy Forwarder
//
// Copyright (c) 2024, 2025, 2026 Ali Polatel <alip@chesswob.org>
// Based in part upon socksns crate which is:
// Copyright (c) 2020 Steven Engler
// SPDX-License-Identifier: MIT
//
// SPDX-License-Identifier: GPL-3.0
use std::process::ExitCode;
use syd::bins::tor::tor_bin_main;
// Set global allocator to GrapheneOS allocator.
#[cfg(all(
not(coverage),
not(feature = "prof"),
not(target_os = "android"),
not(target_arch = "riscv64"),
target_page_size_4k,
target_pointer_width = "64"
))]
#[global_allocator]
static GLOBAL: hardened_malloc::HardenedMalloc = hardened_malloc::HardenedMalloc;
// Set global allocator to tcmalloc if profiling is enabled.
#[cfg(feature = "prof")]
#[global_allocator]
static GLOBAL: tcmalloc::TCMalloc = tcmalloc::TCMalloc;
fn main() -> ExitCode {
tor_bin_main()
}