TGViewer
C++ - Reddit C++ - Reddit @r_cpp · 229 subscribers
Post #24718 38
RustyPP: A C++20 library and Clang tool to enforce Rust-like safety and mutability.

Find the source here!: https://github.com/I-A-S/RustyPP

Hey folks, first of all to the mods, this post is strictly hand written, not an AI generated ounce in here 😂

I recently started learning Rust and really liked the borrow checking mechanism and more importantly the "immutable by default" aspect (among a lot more actually).

With Microsoft putting Rust in the Windows kernel and Linus approving it for use in the Linux kernel, let's admit it, Rust is becoming an avengers level threat to C++. For a good reason, in this day and age, security and safety has become exponentially more important.

My goal is promote (and enforce using rustypp-validator), the use of good aspects of Rust to C++.

Here's what RustyPP currently offers:

1) Single header include: rustypp.hpp (this gives you Mut, Const, Ref, MutRef, Result and basic optional type aliases u8, i32 etc.)

2) rustypp-validator: This a standalone C++ written executable embedding clang to enforce the "safe" coding practices.

3) rustypp-vscode: VSCode extension to give you validator checks in real time as you type

following are planned but not available yet:

1) CLion extension

2) RustyPP transpiler

RustyPP is still v0.1.0 btw so the API is not final is subject to changes (tho ofc I will only add breaking changes if the benefit outweighs the cost)

My hope is to make C++ codebases more secure (and standardized). I love cpp, instead of making Rust my daily driver, I'm trying to bring the genuinely good aspects of Rust to cpp.

Project is released under Apache v2.

Any and all feedback is welcome!

https://redd.it/1qlrx75
@r_cpp
GitHub GitHub - I-A-S/RustyPP: Rust-like Safety and Syntax for C++20 Rust-like Safety and Syntax for C++20. Contribute to I-A-S/RustyPP development by creating an account on GitHub.
More from @r_cpp
  1. Oct 8, 2026Henrik Fransson: From Prompt to Probe - Closing the Agentic AI Loop on Bare Metal https://…
  2. Oct 7, 2026(Imperfect) Emulation of Rust's borrow checker in C++23 with Clang Extensions https://comp…
  3. Oct 7, 2026Escaping `CreateProcess()` arguments on Windows https://holyblackcat.github.io/blog/2026/0…
  4. Oct 7, 2026flat_map internals https://quantdev.blog/posts/flat-map-internals/index.html https://redd.…
  5. Oct 7, 2026New C++ Conference Videos Released This Month - September 2026 C++Now 2026-08-31 - 2026-09…
  6. Oct 7, 2026Jean Frantz René: C++ Memory safety for safety-critical and non-safety critical applicatio…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →