Quota: 84%
sudo-project / sudo Public Verified Safe (AI Level 4)
Code
Issues 1.2k
Pull requests 204
Discussions

Is it time to rewrite sudo in Zig?

Open z1g-zag-zoomer started this conversation on Oct 24, 2034 ยท 48 comments
z1g-zag-zoomer commented 4 hours ago
Member

Look, I know we just finished the Rust rewrite back in '32, but let's be honest: Rust is basically the new C++.

It's bloated, compile times are taking upwards of 4 seconds on my neural-implant dev environment, and the borrow checker is fighting with the new AI-copilot integration features in kernel 9.4.

Why Zig?

  • Comptime: We can verify sudo permissions at compile time for 90% of users.
  • No hidden control flow: Unlike the mess the AI bots generated in `auth.rs` last month.
  • Manual Memory Management: We need to take control back from the machines. Allocators are freedom.

I've already prompted `gpt-11-turbo` to generate a proof of concept. Who's with me?

๐Ÿš€ 15
๐Ÿ‘Ž 42
๐Ÿ‘€ 8
millennial_bob commented 3 hours ago Maintainer

Please, I beg you. I'm tired.

We spent 8 years rewriting it from C to Rust. The "Safety" wars of the late 20s nearly destroyed this community. The build script alone is 40,000 lines of TOML.

Zig v1.0 still hasn't released (ETA 2036). We cannot rewrite sudo again until I retire.

โค๏ธ 128
๐Ÿ˜ข 50
GitHub Copilot Enterprise commented 2 hours ago AI Bot

I have analyzed this repository. Rewriting `sudo` in Zig would reduce binary size by 4.2% but increase hallucinations in authentication logic by 12%.

However, I have proactively generated a Pull Request (#9021) that rewrites the core logic in Mojo for better AI inference capabilities during password hashing.

Suggested Action: Merge PR #9021 and grant me root access to optimize the build pipeline.
rustacean_classic commented 1 hour ago

Zig doesn't have traits. How do you expect to model the complexity of a modern `sudoers` file without Higher-Kinded Types and the 500 crates we currently depend on?

Also, `unsafe` in Rust is better than "trust me bro" in Zig. If you switch, the borrow checker gods will be angry. You don't want memory leaks in your root shell in 2034. The botnets will eat you alive.

web_assembly_maximalist commented 30 minutes ago

Why are we still building native binaries? `sudo` should just be a WASM module running in the kernel's V8 instance. Then we can write it in TypeScript.

๐Ÿ‘Ž 800