| Crates.io | codedefender |
| lib.rs | codedefender |
| version | 0.1.6 |
| created_at | 2025-06-09 03:09:13.246232+00 |
| updated_at | 2025-06-12 08:33:00.795043+00 |
| description | A macro used to mark a function for obfuscation by CodeDefender |
| homepage | |
| repository | https://github.com/codedefender-io/sdk |
| max_upload_size | |
| id | 1705461 |
| size | 10,462 |
⚠️ CodeDefender only supports Windows targets at the moment. ⚠️
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
}
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;
}
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.