7 releases
Uses new Rust 2024
| 0.1.6 | Jun 12, 2025 |
|---|---|
| 0.1.5 | Jun 12, 2025 |
#640 in Procedural macros
233 downloads per month
5KB
⚠️ CodeDefender only supports Windows targets at the moment. ⚠️
Rust Software Development
Simply add codedefender to your rust project with the following command:
cargo add codedefender
This will include the rust crate that contains the macro CODEDEFENDER!.
use codedefender::*;
#[codedefender("Profile1")]
fn addint(x: i32, y: i32) -> i32 {
println!("add({}, {})", x, y);
x + y
}
C/C++ Software Development
To use CodeDefender SDK simply include "codedefender.h" into your C/C++ project. Then use the macro provided.
#include <stdio.h>
#include "CodeDefender.h"
// You can declare this in your header files!
CODEDEFENDER("Profile1", int, addint, (int a, int b));
int addint(int a, int b) {
return a + b;
}
Obfuscation Profiles
Profiles are defined within the configuration file created on the SaaS (https://app.codedefender.io). Here is an example of a configuration file exported from the SaaS
{
"settings": {
... // Removed for brevity
},
"profiles": [
{
"id": "475e59f5-7e01-436f-8406-02600b9b7c64",
"name": "Profile1", // Here is the profile name!
"locked": false,
"settings": {
// ... Removed for brevity
},
}
]
}
This provides an easy to obfuscate functions with pre-defined obfuscation settings.
Dependencies
~115–490KB
~12K SLoC