News for hackers. Stuff that matters.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by t6jvcereio on Friday September 02, 2022 @07:52PM (#32697047)
It seems the Rust people are especially prone to re implementing things. Nothing is really created, just reimplemented.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by db65edfc7996 on Friday September 02, 2022 @07:58PM (#32697095)
I am happy for most software to move from C into almost anything else. Something unlikely to have memory exploits, or with standardized tooling for dependency management and compilation.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by anthk on Friday September 02, 2022 @09:44PM (#32697752)
Plan9/9front uses C but...

- There are no dynamic binaries. Everything it's static. But binaries and the userland are tiny and usable.

- Cross compile it's dumb easy. [0-9]c, one number per arch.

- Every OS comes with compilers, libraries and sources for every arch.

- Security it's handled by separated modules, a password/login daemon/server and namespaces. Totally different. That will be the future in 10 years, and not Rust.

Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by adrianN on Saturday September 03, 2022 @01:25AM (#32699012)
The kind of "security" that you get by using a safer language like Rust (instead of C), can't be achieved by using anything that can be described as a "module" in an unsafe language.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by anthk on Saturday September 03, 2022 @06:10AM (#32700383)
Namespaces are not modules, but a proper design.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by stoplying1 on Friday September 02, 2022 @10:04PM (#32697877)
I am not sure I can think of something that I more want reimplemented in Rust than Tor. In fact, as excited as I am about Rust inside the kernel, I'm more excited about this and the Rust-ification of Firefox. Given the distro I use, the biggest risks to me are almost guaranteedly through (some) browser.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by AgentME on Friday September 02, 2022 @07:55PM (#32697065)
This was an initiative by the Tor Project itself, in order to make their codebase easier to work on and more secure.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by truncate on Friday September 02, 2022 @08:06PM (#32697152)
In a way it is nice way to grow Rust ecosystem quickly at-least. Likely makes existing libraries better, and fills up the missing holes in ecosystem. If everyone builds just new stuff, it will likely grow at slower pace, and much smaller ecosystem for libraries.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by nindalf on Saturday September 03, 2022 @04:57AM (#32700046)
I'd be fascinated to hear examples of what you think of as "new" and not a reimplmentation. Because the entirety of human history is learning from others, improving it and releasing that as a new invention. All of us stand on the shoulders of giants whenever we do anything.

Databases, text editors, network protocol implementations, GUI frameworks, command line argument parsers, game engines, search engines, build tools - no matter what program is written in any language, there is a program written elsewhere in another language that inspired and informed it.

That's not a knock on the new language, it's just stating a simple fact about human beings.

Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by rthomas6 on Friday September 02, 2022 @08:32PM (#32697353)
I think this happens with a lot of languages. The Rust implementations just get more eyeballs and press. Presumably because of the inherent memory safety + speed of (non unsafe) Rust.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by anthk on Friday September 02, 2022 @09:41PM (#32697732)
So like Unix with C being rewritten in that language instead of the original one written in PDP11 assembler for portability. Now people rewrites things in Rust for security. It's good, but I think it can be worse; it may make "lazy" programmers and if some bug it's discovered in the Rust runtime, everyone will be equally f*cked.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by e63f67dd-065b on Saturday September 03, 2022 @12:36AM (#32698768)
One of the explicit goals of rust is that it doesn’t have a runtime, so I’m not sure what you mean. If there’s a bug in rustc then we’re about as fucked as a bug in clang or gcc, so I’m not sure how that’s worse.
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by anthk on Saturday September 03, 2022 @06:16AM (#32700408)
Rust has a standard library working as something akin to a runtime, period. https://github.com/rust-lang/rust/blob/33916307780495fe311fe...
Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by tialaramex on Saturday September 03, 2022 @10:47AM (#32702344)
Sure, although in this sense C also has a runtime. I assure you there's no magic where CPUs just know that the C main() function is where your program starts. That's what CRT stands for if you see things like "crt0.s" or "crtmain" mentioned, C Run Time.

This Rust code is handing over from your operating system to the main() function of your Rust program, it's arranging that you've got all those modern application amenities like command line parameters, environment variables, it will name your thread (if the OS has names for threads) and so on.

Obviously if your Rust is firmware for $5 device it probably doesn't have an operating system, and it certainly doesn't have command line options, accordingly no_std (the Rust environment you are writing for) doesn't do this stuff. You will wake up alone, with the function you annotated (IIRC with #[start]) running and only the features from Rust's core library. The equivalent in C is standalone mode, C doesn't give you a library at all, just your language, operators etc and your wits. You will of course write your own library unless your project is tiny, because this is pretty unsatisfactory.

However, Arti is not intended to be firmware for a cheap piece of electronics, so both the C Tor implementation and Arti will end up with this very thin runtime to run as applications, the runtime just sets things in motion and calls your main function.

Re:Tor – Arti 1.0.0 is released: Rust Tor implementation rea... by adgjlsfhk1 on Saturday September 03, 2022 @02:22AM (#32699284)
and it's worth noting that this isn't hypothetical. the c standard is somewhat unclear and contradictory, and as such no two c compilers fully agree with each other on what the standard actually means.