aegis_vm_macro

Crates.ioaegis_vm_macro
lib.rsaegis_vm_macro
version0.2.51
created_at2025-11-28 13:37:40.718273+00
updated_at2025-12-16 11:16:39.919521+00
descriptionProc-macro for VM-protected functions - RustAegis
homepage
repositoryhttps://github.com/onurkun/RustAegis-vm-macro
max_upload_size
id1955302
size389,549
Onur Kundakçıoğlu (onurkun)

documentation

README

RustAegis Macros

Proc-macro crate for RustAegis - a code virtualization and obfuscation framework.

Usage

This crate is re-exported by aegis_vm. You should use aegis_vm directly:

[dependencies]
aegis_vm = "0.2.2"
use aegis_vm::vm_protect;

#[vm_protect]
fn secret_function(x: u64) -> u64 {
    x + 42
}

// NEW in v0.2.2: Native function calls work automatically!
fn external_check() -> bool { true }

#[vm_protect]
fn protected_with_calls() -> bool {
    let result: bool = external_check();  // Auto-wrapped
    result
}

Features

  • VM Bytecode Compilation: Converts Rust AST to custom VM bytecode
  • Native Function Calls: External functions automatically wrapped and callable from VM
  • String Obfuscation: aegis_str! macro for compile-time string encryption
  • White-Box Cryptography: AES key derivation without exposing keys
  • Protection Levels: debug, standard, paranoid

Important Notes

  • Use explicit bool type annotations: let x: bool = func();
  • Rust macros (println!, etc.) not supported - use wrapper functions
  • Supported types: u64, u32, i64, i32, u16, u8, bool, char

License

MIT

Commit count: 0

cargo fmt