# VeilPDF — PDF security CLI with Rust orchestrating Python + Zig subprocesses

**URL:** <https://users.rust-lang.org/t/veilpdf-pdf-security-cli-with-rust-orchestrating-python-zig-subprocesses/140872>\
**Category:** announcements\
**Created:** [June 21, 2026, 1:12pm UTC](https://users.rust-lang.org/t/veilpdf-pdf-security-cli-with-rust-orchestrating-python-zig-subprocesses/140872 "2026-06-21T13:12:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zang7777](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/zang7777/32/51994_2.png) [@zang7777](https://users.rust-lang.org/u/zang7777)\
**Post date:** [June 21, 2026, 1:12pm UTC](https://users.rust-lang.org/t/veilpdf-pdf-security-cli-with-rust-orchestrating-python-zig-subprocesses/140872/1 "2026-06-21T13:12:32Z")

</div>

![veilpdf-demo](https://us1.discourse-cdn.com/flex019/uploads/rust_lang/original/3X/0/a/0a95008d4c958b53cab46d6d5455b724eceb1887.gif)  
Built a local PDF security toolkit where Rust handles the CLI and  
process orchestration, Python does the heavy PDF parsing (pypdf,  
pdfminer, tesseract), and Zig handles the crypto layer (AES-256,  
byte-level watermark injection).

The architecture: Rust CLI → Python subprocess → Zig binary.  
Rust's role is intentionally narrow — argument parsing, subprocess  
management, error boundaries, colored terminal output via `colored`  
and `clap`. find\_root() walks up the directory tree to locate  
core/detect.py so the binary works from anywhere.

Interesting design decision: rather than PyO3 bindings, I used  
subprocess calls. Tradeoff was simpler build (no binding complexity)  
vs. overhead per command. For a CLI tool where each invocation is  
a single command, subprocess is fine.

[github](https://github.com/Gaurav-x111/veilpdf)

---

<div class="post-metadata">

**Author:** ![system](https://sea1.discourse-cdn.com/flex019/user_avatar/users.rust-lang.org/system/32/51372_2.png) [@system](https://users.rust-lang.org/u/system)\
**Post date:** [September 19, 2026, 1:13pm UTC](https://users.rust-lang.org/t/veilpdf-pdf-security-cli-with-rust-orchestrating-python-zig-subprocesses/140872/2 "2026-09-19T13:13:28Z")

</div>

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.
