Improve Rust code clarity across the workspace

Document public APIs and non-obvious control flow so the protocol, simulator, and macro crates are easier to follow. Tighten a few helper paths and feature gates while preserving behavior and keeping the workspace warning-free.
This commit is contained in:
Michael Mikovsky
2026-04-25 11:11:19 -06:00
parent f49af7fa22
commit ba3f28a78c
26 changed files with 571 additions and 402 deletions
+3
View File
@@ -1,6 +1,9 @@
const ENV_KEY_NAME: &str = "OBFUSCATION_KEY";
const BACKUP_ENV_KEY: &str = "OBFUSCATION_KEY_DO_NOT_USE";
/// Returns the obfuscation key used by the proc macros.
///
/// The fallback keeps macro expansion deterministic when the environment variable is absent.
pub fn get_encryption_key() -> String {
if let Ok(key) = std::env::var(ENV_KEY_NAME) {
key