Nightmare Obfuscator is a defensive IP-protection tool for controlled collaboration. It creates a working obfuscated copy of a Rust project while the owner keeps the original source. Each output includes a locked metadata vault with checksums, configuration metadata, owner/project metadata, and an integrity signature.
V1 is intentionally narrow:
- Rust source support only.
- One-way obfuscation; the original repo remains the source of truth.
- No runtime key requirement for collaborators.
- No deobfuscation or encrypted original-source recovery promise.
- String encryption is disabled until it can preserve builds reliably.
cargo build --releaseObfuscate a project into a sibling <name>-obfs directory:
nightmare obfuscate ./my-rust-projectCopy the full project but obfuscate only selected paths:
nightmare obfuscate ./my-rust-project --select src/criticalChoose an explicit output directory and ignore additional paths:
nightmare obfuscate ./my-rust-project \
--output ./partner-drop \
--select src/core.rs \
--ignore snapshotsVerify an obfuscated output:
nightmare verify ./my-rust-project-obfsInspect the metadata vault:
nightmare vault ./my-rust-project-obfsBy default, Nightmare copies the entire input project so build files, assets, and
configuration remain present. If no --select values are provided, all supported
Rust source files are obfuscated. If --select is provided, only matching files
or directories are obfuscated and unselected files are copied byte-for-byte.
The default ignore set excludes .git, target, dependency/vendor folders, and
.nightmare. Additional --ignore <pattern> values are matched against relative
paths.
The output metadata lives at:
.nightmare/manifest.json
.nightmare/signature
cargo fmt --check
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspaceFixture acceptance tests are under fixtures/ and tests/acceptance.rs.
main is the stable/release branch and dev is the active integration branch.
CDLI.ai maintainers own repository governance through CODEOWNERS, security
reporting, and review gates.
Licensed under either MIT or Apache-2.0, at your option.