10 ms·
Rust 1.5
- seren 11y agoI have a small question : I have installed 1.4 through rustup.sh. What is the clean way to upgrade to 1.5 ? I don't think there is some kind of 'rustup.sh upgrade' Delete 1.4 & reinstall ? Or downloading rustup 1.5 will apply a clean install on the existing one ?
- steveklabnik 11y agoRun rustup.sh again, and it will Just Work. (If not, that's a bug.) If you want to have multiple versions installed at the same time, https://github.com/brson/multirust https://github.com/brson/multirust is super cool. Generally speaking, installation is something we're working on: working with Linux package maintainers, rolling rustup and multirust together and making them work well cross-platform, etc.
- jumpwah 11y agoIt's also easy to have multiple versions installed using nix.
- ones_and_zeros 11y agoAny plans to offer official Rust Docker images? Or is this it? https://hub.docker.com/r/jimmycuadra/rust/ https://hub.docker.com/r/jimmycuadra/rust/
- steveklabnik 11y agoThere aren't any plans at the moment, no.
- lambda 11y agoWhat benefit would Docker images have over the existing upstream distribution or distro packaging? The Rust compiler doesn't have any particularly complicated dependencies, either installing the binaries directly from rust-lang.org or installing packages from your distro (if your distro has packages yet) should work fine. Container images are great for daemons with possibly complicated dependency sets that might have conflicting version requirements with other packages and can benefit from isolation from other packages that containerization gives, but seem like a pretty heavyweight solution for just installing a compiler.
- Drdrdrq 11y agoOne benefit: one could install latest version of Rust on any distribution. Debian stable for instance usually lags behind (with good reason, but still...). I imagine it is mostly useful for checking out Rust though, not for normal use.
- lambda 11y agoThe installer from https://www.rust-lang.org https://www.rust-lang.org works fine on Debian stable. Right now, you can just use the upstream rustup.sh script for platforms that don't yet have it packaged (like Debian stable), or install from your distro for those that do (or use rustup.sh on those as well if you like). What I'm not seeing is the value of a Docker image. Rust doesn't have much in the way of runtime dependencies, which is where the value of a container generally comes in. I don't know of a platform where Docker image would work but rustup.sh would not.
- nitrogen 11y agoI'd attribute it to IMO bad devops habits encouraged by Docker. It's too easy in Docker to depend on someone's unofficial image ("FROM rustxyz" vs. "FROM debian + download deps + install rust"). Having official images would at least reduce the number of people building their infrastructure on unverified/unofficial images.
- Drdrdrq 11y agoSo you think running some script on my machine is preferable to running a container? If I don't like having Rust around, with containers I can just remove it. With script - yeah, maybe, with some digging for correct parameters and assuming it cleans up after itself properly (which is far from trivial). Packages are of course preferable if available and up-to-date.
- steveklabnik 11y agorustup.sh has an --uninstall flag that should remove everything cleanly.
- e12e 11y agoStrongly recommend multirust. It can eat a bit of space if you end up with both stable, beta and nightly installed (but that can still be a good idea -- obviously lots of new projects will experiment with some new features). But multirust takes a lot of cues from other similar tools for sandboxing. I just did: $ multirust update $ multirust show-default multirust: default toolchain: stable multirust: default location: (...) rustc 1.5.0 (3d7cd77e4 2015-12-04) cargo 0.6.0-nightly (e1ed995 2015-10-22) $ multirust list-toolchains beta nightly stable $ du -hs ~/.multirust/ 996M /home/e12e/.multirust/
- eoi 11y agoAlso worth noting is multirust-rs, a reimplementation of multirust in Rust, which notably adds Windows support. I haven't tried anything fancy with it yet but so far it just works. https://github.com/Diggsey/multirust-rs https://github.com/Diggsey/multirust-rs
- steveklabnik 11y agoThe intention is to unify this, multirust, and rustup.sh. It will probably just be branded "rustup."
- toqueteos 11y agoThank you so much for posting this. I was expecting something like this to pop but never tried searching.
- hatsunearu 11y agorustup.sh is really freaking awesome. I was shocked at how insane it is to set up Go when I peeped at my friend installing it. Never heard of programming but you still want to compile a project? Step 1: run rustup.sh (curl -sSf https://static.rust-lang.org/rustup.sh https://static.rust-lang.org/rustup.sh | sh) Step 2: clone the repo of the project or your regional equivalent Step 3: cargo build --release (or now with the new cargo install feature, cargo install) Step 4: Enjoy
- clessg 11y agoHow are compile times now? The one barrier I had to using Rust for anything large was the awful compile times. Very happy to see the tooling improvements, though. Great work!
- steveklabnik 11y agoWell, "now" is relative. When did you last try? They've been steadily dropping each release, though this latest one isn't as large as the last few.
- clessg 11y agoApologies, I should have mentioned that. It's been about 9 months.
- cjg 11y agoSince then Rust 1.2 had a big focus on performance: http://blog.rust-lang.org/2015/08/06/Rust-1.2.html http://blog.rust-lang.org/2015/08/06/Rust-1.2.html
- sanxiyn 11y agoI measured ~40% improvement from 2015-05-10 to 2015-10-30. That is, it takes 0.6x time to compile. 2015-05-10 was chosen because Rust 1.0 was released 2015-05-15. https://github.com/sanxiyn/sandbox/blob/master/rust/time-2.png https://github.com/sanxiyn/sandbox/blob/master/rust/time-2.p...
- e12e 11y agoI'm not sure what's considered slow or fast, but I just tried a couple of larger-ish rust projects. All data on a midrange SSD, i7 ~4.4Ghz. Warm disk-cache, so pratcically everything in RAM. crates.io backend service: # Note the thing pulls down lots of dependencies doing # install, so this is after a "cargo build;cargo clean": git clone git@github.com:rust-lang/crates.io.git crates.io.git cd crates.io.git/ ./script/init-local-index.sh multirust run nightly cargo build --release multirust run nightly cargo clean # 4 threads, ~100% CPU up to compiling the final cargo.io bit, # which takes the longest: git diff diff --git a/Cargo.toml b/Cargo.toml index cf99b60..02e54fb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ version = "0.1.0" [profile.release] opt-level = 2 +codegen-units = 4 [lib] name = "cargo_registry" $ time multirust run nightly cargo build --release real 1m29.082s user 4m47.276s sys 0m6.196s # Single threades (default Cargo.toml): real 1m41.210s user 4m0.376s sys 0m5.120s Servo: git clone https://github.com/servo/servo servo.git cd servo.git/ ./mach build --release (Servo also pulls down lots of dependencies, including a full rust toolchain...) ./mach clean time ./mach build --release Build completed in 791.07s real 13m11.874s user 40m21.468s sys 0m51.304s At approximately 100% cpu for the first part, either the servo build script makes sure things are parallelized, or the Cargo.toml-settings are set for parallell builds (haven't checked). And finally, a smaller project: git clone https://github.com/Aaronepower/tokei.git cd tokei/ cargo build --release cargo clean $ time cargo build --release real 0m30.354s user 0m32.708s sys 0m0.444s According to tokei (which is a blazingly fast cloc tool), there's ~100k cloc of rust in servo, ~7500 cloc of Rust in crates.io (but that doesn't include all the dependencies...). After doing a clean install of rust stable with multirust, the combined cloc of stuff under ~/.multirust...cargo/src and tokei is ~11.5k cloc of rust, along with ~ 1400 cloc of c++.
- Cshelton 11y agoCongrats first of all! I love Rust and am using it more and more. I'm very excited for 'cargo watch'. These tools built into the package manager will be so helpful with peoples' first time Rust experience. I think I'm going to say it, Rust has my favorite package management system of any language I've used. Side Note: I'm also a fan of the 6 week release assembly line Rust has going on. I'm glad that it's staying consistent.
- kibwen 11y agoI was actually suggesting that the Rust devs delay the release until next week because all the release orchestrators are fully occupied with the bi-annual Mozilla workweek, but it seems that they've managed to pull it off without a hitch. :)
- mangeletti 11y agoI've been excited to try Rust for some time now, but I've been holding off, only because I'm primarily developing web applications and I've heard from a few people that Rust is better suited for other tasks (based on the built-ins, packages, etc.?), despite there being at least a few frameworks out there. What are your thoughts on this? Have things changed? Is the assumption just dead wrong, and Rust is in fact tremendous for web application development?
- swah 11y agoIf not for Rust, would you write your app in C++ or Python/Ruby/JS?
- mangeletti 11y agoPython (currently using), or Go. Add JS to that list as well, because I've done a little bit of work in Node, but that was before Coroutines (back in the days of yore when "callback hell" was a thing), so I wasn't nearly as excited at the time as I probably would be now.
- swah 11y agoSo no, Rust is not a good option :)
- iamd3vil 11y agoTry Elixir (https://elixir-lang.org https://elixir-lang.org). Phoenix framework is awesome and working with it is a pleasure.
- mangeletti 11y agoThanks. Elixir looks interesting. I'm apprehensive about the "runs on Erlang" part though (wary of compiles-to or runs-on languages, unless the "to" or "on" is C).
- 11y ago
- wyldfire 11y agoCongrats to the team! I recently wrote my first Rust [1] project. Great experience, IMO. I faced a lot of interesting challenges because my use case was a little outside of typical. But I tried to minimize 'unsafe' and I was still satisfied with the results so far. I know I've only just scratched the surface of the language and I'm looking forward to learning more. [1] https://github.com/androm3da/libfaultinj https://github.com/androm3da/libfaultinj
- logophobia 11y agoJust a small remark. You might want to note in your readme why you'd want to use a fault-injection library. I wasn't familiar with the concept, and had to google why you'd want to do that (for testing unexpected errors and the application's handling of those errors).
- wyldfire 11y agoGood suggestion: https://github.com/androm3da/libfaultinj/commit/9e11fadf6f8ba8b218e8c074417fc640b93055a9 https://github.com/androm3da/libfaultinj/commit/9e11fadf6f8b...
- kibwen 11y agoThis looks like a really cool utility! What other tools out there provide the same service, and how do they compare to this?
- wyldfire 11y agoI don't think there are any that I know of. There's several tools that leverage LD_PRELOAD hooks though. ElectricFence is similar but focusing on out-of-bounds memory accesses. Actually, that's not really fault injection, more like sanitizing bad behavior. There's other fault injection stuff for linux, usually at different layers (I've seen some that use systemtap, e.g.).
- lobster_johnson 11y ago
- andyl 11y agoBrowsing the names of contributors, I was surprised at the lack of gender diversity. Four or five female contributors at the very most. Rates of female participation below 5% - wow. Why is Rust lang so anti-female?
- ape4 11y agoI find it shocking that you assume gender based on name.
- rimantas 11y agoBecause back in the days when Rust appeared it was heavily marketed as the toy for boys /s
- deleted 11y ago[deleted]
- rewqfdsa 11y agoDon't you have anything better to do than gender-troll? Like write some code, maybe? For god's sake, Rust goes out of its way to be modern and gender-inclusive. They have a god damn code of conduct, explicitly encourage participation from everyone, and actively seek contributors of all types. What the else should they fucking do? Posts like yours just demonstrate that you can never win by giving into SJW demands. No matter how much you do, it's never enough. Get lost. We're here to talk about technology, not about your imaginary slights of half of humanity against the other.
- zaczac 11y agoIs this coincident with Go 1.5 release?
- steveklabnik 11y agoNo. We release every six weeks, period. Any resemblance to other releases, living or dead, is purely coincidental.
- sanxiyn 11y agoFYI, Go releases roughly every six months. From http://blog.golang.org/go12 http://blog.golang.org/go12, "This new release comes nearly seven months after the release of Go 1.1 in May. We anticipate a comparable interval between future major releases." Go 1.3 and 1.4 took six months, 1.5 eight months.
- deleted 11y ago[deleted]
- easytiger 11y agoIt is called humour.
- issaria 11y ago> . Period. This is not humour, this is aggressive.
- steveklabnik 11y agoI apologize, I was going for humor. No aggression was intended. Humor is hard in text. What I meant with the "period" is that our schedule isn't tied to features, if a feature isn't ready, it just misses the release and goes into the next one. I can say, unless there's some kind of catastrophe, that Rust 1.6 will be released on the 21st of January.
- 11y ago
- jeffdavis 11y agoI know this seems like a trivial issue, but I've been bothered by the try!() macro for a while. I keep hoping then will adopt the "?" postfix operator to mean the same thing, because it seems to increase readability a lot. I'm open to other ideas too, but that seemed like the simplest way to get the error handling out of the way. Ordinarily I try hard not to complain about syntax, but this seems to cause people to use .unwrap() where it's not safe (like a library).
- steveklabnik 11y agoThere was major movement on the ? syntax last night, actually.
- jeffdavis 11y agoGreat to hear! Thank you.
- steveklabnik 11y agoNo problem. To be more specific, https://github.com/rust-lang/rfcs/pull/243#issuecomment-163308249 https://github.com/rust-lang/rfcs/pull/243#issuecomment-1633... and https://github.com/rust-lang/rfcs/pull/243#issuecomment-163388772 https://github.com/rust-lang/rfcs/pull/243#issuecomment-1633... TL;DR: we're still adjusting process a bit, but the idea is that this is "good enough" to actually land, behind a feature gate, to start gaining experience. We still reserve the right to tweak it before it goes stable, but it's better to get it into people's hands, rather than continue to debate the last few minor points.
- Argorak 11y agoHuh, does that reflect in RFCS or something somewhere? I'm quite pleased by the current solution and am not such a big fan of "?".
- jeffdavis 11y agoI'm curious what you do. Do you use try!() extensively, and fine it just fine? Or do you use something else, like .unwrap()?
- devy 11y agoHomebrew's Rust receipt is still at 1.4 :( https://github.com/Homebrew/homebrew/blob/master/Library/Formula/rust.rb https://github.com/Homebrew/homebrew/blob/master/Library/For...
- filsmick 11y agoThis doesn't look like 1.4 but _1.0.0-beta.4_, so much older.
- devy 11y agoI've just updated the link. It is 1.4 as I've brewed rust few minutes ago. And you get the point, don't need to picky on the specifics.
- devy 11y agoHomebrew receipt has been updated to 1.5 just a few hours later! https://github.com/Homebrew/homebrew/commit/dee292132fb73820a1e3c38af6cd636fc1495a3d https://github.com/Homebrew/homebrew/commit/dee292132fb73820...
- hatsunearu 11y agocargo install is by far the most interesting one in terms of usability. I was wondering how to write deployment instructions for my binary program written in Rust; it's kinda clunky to say "here, open target/release/my_program or copy it to /usr/share/bin"
- BuckRogers 11y agoI've been writing small libraries in Rust and calling them from Python. Fantastic pair! Congrats to the Rust team.