crypt_guard_proc 2.0.4

CryptGuardProc is the proc macro crate related to CryptGuardLib, which is a comprehensive Rust library designed for strong encryption and decryption, incorporating post-quantum cryptography to safeguard against quantum threats. It's geared towards developers who need to embed advanced cryptographic capabilities in their Rust applications.
Documentation

Proc-macros for crypt_guard.

Responsibility scope

This crate owns five proc-macros:

  • activate_log — attribute macro: injects initialize_logger(path) alongside the annotated fn. Now emits a direct call rather than touching any global mutex.
  • concat_cipher — function-like: hex-encodes a (Vec<u8>, Vec<u8>) tuple into a "key$cipher" string.
  • split_cipher — function-like: decodes "key$cipher" back to (Vec<u8>, Vec<u8>).
  • log_activity — function-like: emits a structured tracing::info! event. The Lazy<Mutex<Log>> path has been removed; no mutex is acquired.
  • write_log — function-like: previously flushed a string buffer; now a no-op (tracing subscribers handle flushing via their own mechanisms).

Backward compatibility

All call-site ergonomics are preserved: log_activity!(process, detail) and write_log!() still compile. Only the generated expansion changes.

Error observability

#[derive(ErrorObservable)] — constructor-as-observable derive macro. Generates:

  • Observable constructor methods for every variant annotated with #[observable(...)]
  • Each constructor emits a structured tracing event at construction time

See the #[derive(ErrorObservable)] documentation for usage.