News for hackers. Stuff that matters.
Re:The Tor Project is switching to Rust by udhghhe on Friday December 12, 2025 @11:12AM (#46245494)
But with no_std, Rust is not memory safe, even when not using unsafe. It does have pattern matching and modules, however.
Re:The Tor Project is switching to Rust by estebank on Friday December 12, 2025 @11:53AM (#46245932)
> But with no_std, Rust is not memory safe, even when not using unsafe.

What makes you say that?

Re:The Tor Project is switching to Rust by yjdiquhf on Friday December 12, 2025 @01:22PM (#46246986)
For an example, if a function in no_std overflows, it can result in undefined behavior, no unsafe required. And stack overflows are easy in Rust, like they are easy in most other systems languages.

Steve Klabnik has lied about that in the past, as he is wont to do.

Re:The Tor Project is switching to Rust by steveklabnik on Friday December 12, 2025 @01:57PM (#46247403)
I don't know where I've lied about this, supposedly. Unless you say that, because of this implementation exception (which is based on target, not std vs no_std by the way) as meaning that "there's no UB in safe Rust" to be a lie.

I would still stand by that statement generally. Implementation issues on specific platforms are generally not considered to be what's being discussed when talking about things like this. It's similar to how cvs-rs doesn't make this a lie; a bug isn't in scope to what we're talking about 99% of the time.

In context, I'd have no reason to deny that this is something you'd want to watch out for.

Re:The Tor Project is switching to Rust by estebank on Friday December 12, 2025 @01:34PM (#46247150)
> For an example, if a function in no_std overflows, it can result in undefined behavior, no unsafe required. And stack overflows are easy in Rust, like they are easy in most other systems languages.

This is true, no_std has no Rust runtime so it doesn't provide stack protection. I am aware of efforts to address this for embedded, but they're not available at the moment.

> Steve Klabnik has lied about that in the past, as he is wont to do.

1) I don't know what Steve has to do with anything I asked so it is bizarre to bring up and 2) I find this is to be a ridiculous statement.