News for hackers. Stuff that matters.
Re:WireGuard-rs – Official Rust implementation of WireGuard by api on Sunday August 11, 2024 @08:40PM (#41220278)
Why is that a bad thing? Maybe it just works and doesn't need further changes.
Re:WireGuard-rs – Official Rust implementation of WireGuard by palunon on Sunday August 11, 2024 @10:10PM (#41220656)
Looking at the supported platforms, it looks like the only one is Linux. The README has this to say about it though: "This will run on Linux; however YOU SHOULD NOT RUN THIS ON LINUX. Instead use the kernel module; see the installation page for instructions."
Re:WireGuard-rs – Official Rust implementation of WireGuard by GoblinSlayer on Tuesday August 13, 2024 @08:51AM (#41234968)
It's like git: you write it for linux, then leave it as is.
Re:WireGuard-rs – Official Rust implementation of WireGuard by mhio on Sunday August 11, 2024 @10:44PM (#41220792)
How do rust projects work over rust versions?

Is rust stable enough from 20-24 that the project would likely remain in a state to compile on a new rust tool chain? Do "Editions" completely solve this?

Re:WireGuard-rs – Official Rust implementation of WireGuard by mmastrac on Sunday August 11, 2024 @11:03PM (#41220852)
Pretty much. I've had a great deal of luck rebuilding older projects. You can lock your toolchain as an added protection, but `cargo clippy --fix` is often enough to fix 90% of those.

I think the only time I really struggled with a toolchain upgrade was with one of the crypto libraries that was bringing in a broken version of some SIMD code (cannot remember the exact details).

For kicks I cloned and build this with Rust 1.80 and it built just fine (a few reasonable warnings), and even bumped the edition up to 2021. The README suggests you need nightly but that's clearly not the case.

EDIT: the Rust code is actually unsoundly using MaybeUnit in a few places.

Re:WireGuard-rs – Official Rust implementation of WireGuard by mhio on Tuesday August 13, 2024 @05:38AM (#41233844)
Thanks for the info.

Is "lock your toolchain" via rustup? It appears to be the equivalent of rbenv/pyenv/nodenv/asdf etc but part of rust.

Re:WireGuard-rs – Official Rust implementation of WireGuard by Aerbil313 on Sunday August 11, 2024 @08:42PM (#41220283)
Cause it presumably has to be compatible with Wireguard upstream?
Re:WireGuard-rs – Official Rust implementation of WireGuard by api on Sunday August 11, 2024 @08:59PM (#41220348)
Wireguard is a pretty fixed and simple standard. Nothing needs to happen.
Re:WireGuard-rs – Official Rust implementation of WireGuard by freeopinion on Sunday August 11, 2024 @10:00PM (#41220615)
So the "tcp: fix incorrect undo caused by DSACK of TLP retransmit" done five weeks ago for the Linux kernel didn't need to happen for the Rust implementation?
Re:WireGuard-rs – Official Rust implementation of WireGuard by palunon on Sunday August 11, 2024 @10:27PM (#41220721)
I don't think this commit has anything to do with wireguard. It's a fix of a bug in the kernel TCP stack, which wireguard doesn't use. (Beware, the wireguard-linux repo is a "fork" of the complete linux kernel)

And even if it did, a userland TUN implementation of the wireguard protocol probably doesn't have the same bugs as the linux kernel one.

Re:WireGuard-rs – Official Rust implementation of WireGuard by verandaguy on Sunday August 11, 2024 @10:30PM (#41220733)
Sure, the standard is relatively straightforward, but the implementations have to keep up with their environment. Wireguard in Linux has to keep up with changes in the kernel to a degree, for example.