Live data from Hacker News

Announcing Rust 1.35.0

blog.rust-lang.org

41–50 of 111 posts

Re: Announcing Rust 1.35.0

#41

Earlier quoted context omitted.

Cargo can work offline. It’s a requirement of the Firefox and Debian build systems, for example. You can also use rustc without cargo if you really want, but Cargo is really good, so I don’t particularly recommend it.

Does that mean it only needs internet for the first build. And then, subsequent builds won’t need internet connection (if I don’t add new dependencies, of course), kind of like Maven?

That's the usual way it's done.

It should be technically possible to replicate cargo's functionality by predownloading the dependencies and deploying them... Before actually needing them.

Nevertheless if you depend on any external crates you have to have access to them, even if only by referencing a local path.

Re: Announcing Rust 1.35.0

#42
post #39

This update comes with a new version of rustup which has much faster updating, especially on windows [0]. If you'd like to experience this performance improvements, run `rustup self update` before your upgrade! [0] https://www.reddit.com/r/rust/comments/brtec1/rustup_1183_re...

Note for others also unsure of this: `rustup update` also does the self-update step, only after it first updates the toolchains.

Re: Announcing Rust 1.35.0

#43

Coming from C/C++. Is working with the online package manager (Cargo?) mandatory? Or is there a sustainable way of working/developing with Rust while completely offline? I'd like to start a project, manually import libraries (downloaded manually, no dependency hell), read documentation, etc. Is it possible?

> is there a sustainable way of working/developing with Rust while completely offline? Yes. Once you have downloaded your dependencies the first time while online you are able to work with them completely offline. > read documentation Rust docs: rustup downloads docs for Rust itself alongside the toolchain when you download it. `rustup doc --book` will open the locally downloaded copy of the book The Rust Programming…

Thank your for the detailed answer.

> Attempting to do it completely manually has no benefit that I can see

Package managers and build tools can do basically whatever they want - run commands, execute binaries, download data, upload data, send telemetry - whatever any one of the package maintainers wants.

I prefer to develop in an offline VM. When a new library is required I just download it using the host machine, copy into VM and use it there. It's easy with make/cMake.

Re: Announcing Rust 1.35.0

#44

Coming from C++, this always throws me a bit: if (0..=10).contains(&5) { I assume we are taking a ref to "5" (and not passing by value) because "Range" is a generic type that might be too big to want to copy (or it may not be copyable at all). But taking a reference to a number for a simple operation like this feels... weird. It makes me worry that Rust is going to be passing around pointers to some stack-allocated "…

what steveklabnik said. if I understand correctly, this is dealing with that 5 as if integers were a generic type. which is the expected "default" behavior (as in compiler design, not programmer daily use). a generic type would be stored on the heap, and references there make sense to avoid copies. what happens here is that integers are special because they are stored in the stack, they are immutable, and always copied, but this special behavior, which makes the reference "absurd" here, hasn't been dealt with (yet).

so yeah, it looks super weird, but when you stop to think about it, it's just that we are so used to integers being "special" that when we see them treated like a generic type it makes us cringe. interesting.

Re: Announcing Rust 1.35.0

#45
post #37

Coming from C/C++. Is working with the online package manager (Cargo?) mandatory? Or is there a sustainable way of working/developing with Rust while completely offline? I'd like to start a project, manually import libraries (downloaded manually, no dependency hell), read documentation, etc. Is it possible?

In addition to what's been said in other replies, there's also `cargo vendor` which can give you even more flexibility when working offline.

This is also being upstreamed into cargo soon!

Re: Announcing Rust 1.35.0

#46
post #36

Earlier quoted context omitted.

For anyone playing along at home, when the async/await RFC was accepted, it left the final syntax of "await" to be decided before stabilization. That was a little over a year ago. There was some debate, but it's been under pretty intense debate since at least November of last year. This has been the most discussed aspect of Rust ever. The tracking issue has 296 comments. There have been numerous threads on the intern…

> This has been the most discussed aspect of Rust ever. I still remember the lifetime syntax (&'a T) discussion. await syntax discussion felt really similar.

Yeah, there’s just so many more people now. It’s possible that the ratio was the same, but the volume feels very different.

Re: Announcing Rust 1.35.0

#47

Coming from C++, this always throws me a bit: if (0..=10).contains(&5) { I assume we are taking a ref to "5" (and not passing by value) because "Range" is a generic type that might be too big to want to copy (or it may not be copyable at all). But taking a reference to a number for a simple operation like this feels... weird. It makes me worry that Rust is going to be passing around pointers to some stack-allocated "…

Part of the problem is conceptualizing this as a reference (which, admittedly, it is without optimization).

Instead, this is a borrow which indicates that the callee will not mutate the argument. It makes more sense in this context.

Re: Announcing Rust 1.35.0

#48

Earlier quoted context omitted.

> is there a sustainable way of working/developing with Rust while completely offline? Yes. Once you have downloaded your dependencies the first time while online you are able to work with them completely offline. > read documentation Rust docs: rustup downloads docs for Rust itself alongside the toolchain when you download it. `rustup doc --book` will open the locally downloaded copy of the book The Rust Programming…

Thank your for the detailed answer. > Attempting to do it completely manually has no benefit that I can see Package managers and build tools can do basically whatever they want - run commands, execute binaries, download data, upload data, send telemetry - whatever any one of the package maintainers wants. I prefer to develop in an offline VM. When a new library is required I just download it using the host machine, c…

I totally understand your desire to develop things in a sandboxed environment but the source code for Rust/Cargo/Etc. is all available under their organization at GitHub. [0] It would be easy to audit and raise issues if you have any concerns.

[0]: https://github.com/rust-lang

Re: Announcing Rust 1.35.0

#49
post #44

Coming from C++, this always throws me a bit: if (0..=10).contains(&5) { I assume we are taking a ref to "5" (and not passing by value) because "Range" is a generic type that might be too big to want to copy (or it may not be copyable at all). But taking a reference to a number for a simple operation like this feels... weird. It makes me worry that Rust is going to be passing around pointers to some stack-allocated "…

what steveklabnik said. if I understand correctly, this is dealing with that 5 as if integers were a generic type. which is the expected "default" behavior (as in compiler design, not programmer daily use). a generic type would be stored on the heap, and references there make sense to avoid copies. what happens here is that integers are special because they are stored in the stack, they are immutable, and always copi…

Perhaps "special" here means "implements the std::marker::Copy trait"?

Or is there something else going on?

Re: Announcing Rust 1.35.0

#50
post #17

I no longer care about Rust anymore because of their lang team's await syntax decision process. It seems the team only cares about satisfying themselves rather than listening to the community's concern. Whenever users spoke about problems proposed by the team, they simply dismissed them saying the concern doesn't contain any new information. With this lang team, I think Rust is going to die quickly. It doesn't worth…

I think some would have reacted exactly with other await syntax proposals. The amount of feedback they got is overwhelming. I believe all of the unique ideas are all looked into by the team. The Lang team is doing a great job. all I wish now is to slow down and not grow the language to C++ levels.

I wish they spent time at making the code a tad bit less symbol-ic and more verb-ic, the amount of nonalphabetic symbols used is just immense and it's not easy to decipher quickly. C++ suffers from the same issue I think.
Post reply on HN