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
Post #24718
38