From 3c7367b74c85fd91bf8b812a7ad66ba857c2858d Mon Sep 17 00:00:00 2001 From: acidvegas Date: Fri, 6 Dec 2024 23:44:19 -0500 Subject: [PATCH] Initial blazing fast commit --- LICENSE | 15 +++++++++++++ README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ rm.rs | 0 3 files changed, 79 insertions(+) create mode 100644 LICENSE create mode 100644 README.md create mode 100644 rm.rs diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..13e8db5 --- /dev/null +++ b/LICENSE @@ -0,0 +1,15 @@ +ISC License + +Copyright (c) 2025, acidvegas + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..b417ce5 --- /dev/null +++ b/README.md @@ -0,0 +1,64 @@ +# πŸ¦€ rm-rs: A Blazingly Fastβ„’ File Removal Tool + +[![Blazingly Fast](https://img.shields.io/badge/Speed-Blazingly%20Fast-orange)]() +[![Memory Safe](https://img.shields.io/badge/Memory-Absolutely%20Safe-green)]() +[![Rewrite](https://img.shields.io/badge/Rewrite-It%20In%20Rust-red)]() + +## πŸš€ Overview + +Introducing `rm-rs`, a revolutionary, memory-safe, blazingly fast implementation of the `rm` command! Written in pure, safe Rust! + +### πŸ”₯ Key Features + +- Blazingly Fastβ„’ file removal capabilities +- Zero-cost abstractions for deleting files +- 100% Memory Safe! +- No unsafe code blocks! +- Fearless file deletion +- Built with Rust's world-class package manager, Cargo + +## πŸ› οΈ Installation +```bash +cargo install rm-rs +``` + +## πŸ“Š Benchmarks + +| Command | Time | Memory Usage | +|---------|------|--------------| +| Original `rm` | 1ms | 1MB | +| `rm-rs` | 1ms + Rust runtime | 1MB + Rust runtime | + +As you can see, we've achieved nearly identical performance to the original `rm` command, but now it's in Rust! + +## πŸ€” Why rm-rs? + +- Are you tired of using battle-tested Unix tools written in C? +- Do you believe everything should be rewritten in Rust? +- Do you enjoy adding unnecessary layers of abstraction? + +Then `rm-rs` is perfect for you! + +## πŸ”’ Security + +Thanks to Rust's ownership model and strict compiler, we can guarantee that this wrapper around the system's `rm` command is absolutely memory safe*! + +*Until it calls the actual `rm` command, but we don't talk about that part. + +## 🀝 Contributing + +1. Rewrite it in Rust (oh wait, we already did that) +2. Add more unnecessary abstractions +3. Create more type-safe wrappers around system calls +4. Write "blazingly fast" at least three times in your PR description + +Because that's what every Rust project does. + +## 🎯 Future Roadmap + +- Rewrite `ls` in Rust +- Rewrite `cd` in Rust +- Rewrite the entire GNU coreutils in Rust +- Rewrite the universe in Rust + +Remember: If it ain't broke, rewrite it in Rust anyway! πŸ¦€ \ No newline at end of file diff --git a/rm.rs b/rm.rs new file mode 100644 index 0000000..e69de29