Earlier quoted context omitted.
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…
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.
Tor – Arti 1.0.0 is released: Rust Tor implementation ready for production use
51–60 of 67 posts
Re: Tor – Arti 1.0.0 is released: Rust Tor implementation ready for production use
#52Earlier quoted context omitted.
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.
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 ready for production use
#53Earlier quoted context omitted.
Yup, the core part of Tor is written in C so it can't get much speedier. Rewriting it in rust is almost is entirely to reduce the footguns you get in C
Might recall reading something to the effect of the C Tor daemon having run into bottlenecks due to lack of multi-threading of certain components and general concern over safety footguns.
Re: Tor – Arti 1.0.0 is released: Rust Tor implementation ready for production use
#54To me this just seems pointless because an implementation in Rust is going to have similar features to one in C, Java, Python, or any of the handful of languages where Tor already exists... I want to rep another project that I think would be more relevant to Tor's goals. It is unfunded yet should it exist: would have the potential to transform privacy on the web. The project is https://github.com/Ayms/node-Tor It's a…
Re: Tor – Arti 1.0.0 is released: Rust Tor implementation ready for production use
#55Earlier quoted context omitted.
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.
Rust has a standard library working as something akin to a runtime, period. https://github.com/rust-lang/rust/blob/33916307780495fe311fe...
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 ready for production use
#56Earlier quoted context omitted.
That is probably because Zcash is a privacy tool that just happens to be a cryptocurrency. Snowden was one of the co-founders of the project. The users are people that rely on the security to stay out of prison, not crypto-bros trying to get rich quick.
Snowden was part of the initial ceremony, along with some other crypto experts. Not sure that qualifies him as co-founder
Re: Tor – Arti 1.0.0 is released: Rust Tor implementation ready for production use
#57Earlier quoted context omitted.
> Too bad rust doesn't really do dynamic linking. As far as I remember, you can actually do dynamic linking. But it has its caveats. Maybe using two different crates, lib-internal and lib-external, where lib-internal compiles to an dylib/so that exposes a C-abi compatible interface. Lib-external it’s just a idiomatic Rust wrapper to that api. It’s a little bit wonky, but I’m pretty sure that it can work.
Apparently there is a dynamic linking ABI for Rust too, but it is not stable enough to use yet for distros like Debian. https://wiki.debian.org/StaticLinking#Rust https://lwn.net/Articles/797616/ https://github.com/rust-lang/rfcs/pull/2603 I note that the PR for Rust symbol mangling got merged, but it looks like it isn't the default yet, they are waiting on external tools supporting it.
Of course you can do dynamic linking without the way that I previously described, but that library will be highly tight to a specific version of the compiler. I think that the biggest problem is dealing with product types for that matter.
Re: Tor – Arti 1.0.0 is released: Rust Tor implementation ready for production use
#58Earlier quoted context omitted.
Apparently there is a dynamic linking ABI for Rust too, but it is not stable enough to use yet for distros like Debian. https://wiki.debian.org/StaticLinking#Rust https://lwn.net/Articles/797616/ https://github.com/rust-lang/rfcs/pull/2603 I note that the PR for Rust symbol mangling got merged, but it looks like it isn't the default yet, they are waiting on external tools supporting it.
>but it is not stable enough That's the problem. Is still, after all this years, unstable. Of course you can do dynamic linking without the way that I previously described, but that library will be highly tight to a specific version of the compiler. I think that the biggest problem is dealing with product types for that matter.