Live data from Hacker News

Welcome to Comprehensive Rust

google.github.io

21–30 of 204 posts

Re: Welcome to Comprehensive Rust

#22
post #3

Is this “just” a 20% project or is this more significant (like Android one day supporting Rust to develop apps)? And I haven’t looked at everything yet, but it suggests to install Rust like this: sudo apt install cargo rust-src While everyone I know uses rustup^: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ^ https://rustup.rs/

I'm tired of installation instructions that consist of "curl | sh". Especially since this one just tries to detect the platform and downloads the correct installer for me. I know what platform I'm running, and I don't want to pipe the internet to my shell. In the end this is unpacking a tarball in ~/.rustup, I don't need the risk of running some bespoke script for that.

Re: Welcome to Comprehensive Rust

#23

Earlier quoted context omitted.

Rust is most definitely slow to compile compared to GCC or LLVM for C/C++. This is a known situation and has been since the pre-1.0 days because of the heavily front-loaded macro and borrow systems. It's the tradeoff you have for having a "safe" language vs a "trusting" one. I would argue that it's not as bad as it's made out to be, especially if you're not doing full recompiles and using it on modern (2019+) hardwar…

It's slower then C for sure. But slower then C++? I doubt it.

Rust is most comparable to C++ with heavy TMP, as it itself also makes use of templates.

Re: Welcome to Comprehensive Rust

#24
post #3

Is this “just” a 20% project or is this more significant (like Android one day supporting Rust to develop apps)? And I haven’t looked at everything yet, but it suggests to install Rust like this: sudo apt install cargo rust-src While everyone I know uses rustup^: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ^ https://rustup.rs/

Apt gives you the version of Rust that was packaged for your distro, so you're not keeping up with the latest releases. It's typically configured to reuse the system install of LLVM, missing some Rust-specific patches that are in the process of flowing upstream. And it references distro-packaged crates by default, meaning that again you're not getting the latest published versions.

Re: Welcome to Comprehensive Rust

#25
post #21

Earlier quoted context omitted.

That would depend on what you're doing, of course :)

No not at all.

…perhaps you lack experience of a time where fixing bugs that cannot be effectively discovered using tools available in other languages took less time than the equivalent code in Rust would take to compile?

Re: Welcome to Comprehensive Rust

#27
post #22
post #3

Is this “just” a 20% project or is this more significant (like Android one day supporting Rust to develop apps)? And I haven’t looked at everything yet, but it suggests to install Rust like this: sudo apt install cargo rust-src While everyone I know uses rustup^: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ^ https://rustup.rs/

I'm tired of installation instructions that consist of "curl | sh". Especially since this one just tries to detect the platform and downloads the correct installer for me. I know what platform I'm running, and I don't want to pipe the internet to my shell. In the end this is unpacking a tarball in ~/.rustup, I don't need the risk of running some bespoke script for that.

On some distros you can install rustup directly, e.g. NixOS or Arch. For Ubuntu, it's sadly not in the default repositories, but there is a snap for rustup uploaded by the rustup maintainer.

https://pkgs.org/search/?q=rustup

https://snapcraft.io/rustup

Re: Welcome to Comprehensive Rust

#28

Can Rust make Android apps faster ? It feels logical because Rust is close to the metal, but I don't know enough Android or Rust to be sure.

Rust can make Android apps faster, but so can Python or Java or JavaScript or C++. It's generally not useful to make a comparison like this in a vacuum.

Re: Welcome to Comprehensive Rust

#29
post #3

Is this “just” a 20% project or is this more significant (like Android one day supporting Rust to develop apps)? And I haven’t looked at everything yet, but it suggests to install Rust like this: sudo apt install cargo rust-src While everyone I know uses rustup^: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh ^ https://rustup.rs/

Hi, I wrote the course :-) Yes, this is a real thing — Android has had support for Rust in the Android Platform for a few years now. Most recently, we shipped support for DNS-over-HTTP/3: https://security.googleblog.com/2022/07/dns-over-http3-in-an...

We put out the course to make it easy for even more people to onboard with Rust.

Re: Welcome to Comprehensive Rust

#30
post #8

Earlier quoted context omitted.

Slower compile times are a small price to pay for memory safety and much higher productivity.

Slow compile times can reduce productivity.

Most of the errors can already be caught by running `cargo check` which is substantially faster than rust.

Coming from C++ rust's compile times don't feel extraordinarily long.

Post reply on HN