// Every `unsafe` block must carry a `// SAFETY:` comment justifying soundness.
// Enforced so the (mostly libc/Win32 syscall) unsafe surface stays documented.
#![warn(clippy::undocumented_unsafe_blocks)]

#[cfg(all(feature = "jemalloc", not(windows)))]
#[global_allocator]
static GLOBAL: tikv_jemallocator::Jemalloc = tikv_jemallocator::Jemalloc;

#[cfg(all(feature = "jemalloc", not(windows)))]
#[allow(non_upper_case_globals)]
#[unsafe(export_name = "malloc_conf")]
pub static malloc_conf: &[u8] = b"background_thread:true,dirty_decay_ms:1000,muzzy_decay_ms:1000\0";

pub mod cli;
pub mod cloud_client;
#[cfg(feature = "cloud-server")]
pub mod cloud_server;
pub mod cloud_sync;
pub mod compound_lexer;
pub mod config_io;
pub mod core;
pub mod daemon;
pub mod daemon_autostart;
pub mod daemon_client;
pub mod dashboard;
pub mod doctor;
pub mod dropin;
pub mod engine;
#[cfg(feature = "gateway-server")]
pub mod gateway_server;
pub mod heatmap;
pub mod hook_handlers;
pub mod hooks;
#[cfg(feature = "http-server")]
pub mod http_server;
pub mod instructions;
pub mod ipc;
pub mod lsp;
pub mod marked_block;
pub mod mcp_stdio;
#[cfg(feature = "http-server")]
pub mod proxy;
pub mod proxy_autostart;
pub mod proxy_setup;
pub mod report;
pub mod rewrite_registry;
pub mod rules_inject;
pub mod server;
pub mod setup;
pub mod shell;
pub mod shell_hook;
pub mod status;
pub mod terminal_ui;
#[cfg(test)]
pub(crate) mod test_env;
pub mod token_report;
pub mod tool_defs;
pub mod tools;
pub mod tui;
pub mod uninstall;
