Also Rust has a lot more inherent safety features than go.
(I think Go is great and its my primary language)
That said, since they use Firefox this bridge has already been burned.
I'd imagine the biggest cultural reason is that many Rust developers were C developers who had a reason to find something better, but still scoff at garbage collection, large runtimes, etc. They probably have a lot more Rust expertise in their circle.
Another technical reason is that they were trying to replace their C code with Rust in bits and pieces before they went with a full rewrite. I don't know about Go, but this is something ergonomically doable in Rust.
[0] https://rust-lang.github.io/rustup/overrides.html#the-toolch...
I see people complaining about Rust's lack of portability, and it is always some obsolete platform that has been dead for 20 years. Let's be serious, nobody is gonna run Tor on an old SGI workstation or Itanium server.
I like loose type systems for some quick scripting, but I started to adopt Rust for many of my personal projects because I find it's so much easier to get back into a project after a year when there are good type system guard rails.
https://github.com/llvm/llvm-project/tree/main/llvm/lib/Targ...
I've never had to do anything unusual with building, but I thought the "almost-ststically-compiled" thing was somewhere Go and Rust were almost identical.
Your parent is saying that, while what you say is true for Rust and Go code themselves, in practice, it is less true for Rust, because Rust code tends to call into C code more than Go code does, and Rust doesn't always statically link to that C code by default.
In all seriousness, I guess you can make this argument if you only care about Windows/macOS, but the moment you run anything else I have to ask why, say, Linux deserves support but not other less-common platforms.
1) Development resources are finite.
2) Linux runs all of the world supercomputers, most of the internet infrastructure (server, routers, etc), most of the cellphones (Android), and lots of other things. Its global marketshare is way bigger than macOS and all the BSD put together.
With that said, remainder of this comment continues with the position that GNU/Linux, which I am writing this comment on, is obviously not worth supporting for the same reasons as i.e. MIPS and RISC-V.
> 1) Development resources are finite.
That is an argument in favor of cutting niche platforms like GNU/Linux.
> 2) Linux runs all of the world supercomputers,
You can't defend a niche OS by pointing out that it's used in a tiny niche market. How many supercomputers exist on earth? I'd bet you there are more working MIPS installations than supercomputers.
> most of the internet infrastructure (server, routers, etc),
I'll grant you headless machines used by IT folks, but that's still a specific subset of the market and it has little bearing on whether, say, Tor should support it as a desktop OS.
> most of the cellphones (Android),
Android/Linux is quite different from GNU/Linux; effectively nobody developing for Android is targeting Linux in any meaningful sense.
> and lots of other things. Its global marketshare is way bigger than macOS and all the BSD put together.
Only if we include embedded systems and servers. If you intend to target servers, then yes obviously Linux matters. Otherwise, not so much.
- better data race handling;
- no garbage collection, more predictable performance;
- stricter type system that can enforce constraints better;
- closer to metal and better FFI support.
Which seems to matter more for Tor project than support for some barely used platform.
Advantage of Rust (or original C implementation) is for users that do not have runtime and want to import Tor libraries (like arti-client) in their code. Go could work but those unmanaged languages are better here. So in the end Rust (or C, C++ etc.) can serve more user-cases.