8 ms·
Announcing Rust 1.10
- moosingin3space 10y agoCongratulations on the release! `cdylib` targets should prove very helpful for embedding, and compilation from a recent stable version will make it much easier to package.
- snuxoll 10y agoThe bootstrap problem is exactly why rust isn't in the Fedora repos right now, so I am very excited about this. Also, dylib will likely end up being preferred for distribution packaging (especially Fedora which HEAVILY discourages static linking, though there's no longer a strict no-static linking policy).
- evmar 10y agoIt's too bad that Rust went to all this language design effort to allow inlining (including when passing a closure to a function, which is really impressive!) only to have distros undo it for some policy that ends up harming their users more than it helps.
- snuxoll 10y agoStatic linking has benefits, but from a distribution standpoint it makes handling security updates (which people expect to be done correctly and in a timely manner) a HUGE pain in the ass. You want to go statically link your internal rust binary that you are pushing out to hundreds or thousands of nodes and you need the extra performance? Go for it, you can handle rebuilding it every time there is a security update (and last I checked dylib's allow both static and dynamic linking against them, so you have that option). But if you want to include your binary in a distribution package repository it really should be dynamically linked, tracking what dependencies everything has and forcing rebuilds and updates for EVERY SINGLE BINARY that uses them is wasteful and a pain to manage.
- slimsag 10y agoThis draft document[1] suggests that Fedora will use the "rebuild all packages" option for packaging Go programs, since it's unlikely to support dynamic linking in the traditional fashion any time soon. [1] https://fedoraproject.org/wiki/PackagingDrafts/Go#Security_in_Go_Language_Packages https://fedoraproject.org/wiki/PackagingDrafts/Go#Security_i...
- lisivka 10y agoI hate Go for exactly that reason.
- snuxoll 10y agoNot much of a choice for Go, but Rust does give the option for dynamic linking so I suspect the Fedora project will take advantage of it. There is no tooling in Koji to support mass rebuilds when dependencies are updated like this, which is why in rawhide when you are about to make an soname bump you are supposed to notify anyone who depends on the package of the change so they can bump the release of their packages afterwards. I can't say anything about the build tooling other releases use (I only have real experience with Koji and a limited look at OpenSUSE's OBS), but I don't think (m)any support "rebuild all that depends on this package" without manual intervention. It's really a crappy situation to be put in by language designers who value their use case over all else, and while, again, I think static linking can have a place it really doesn't belong in distribution repositories if it can be helped.
- evmar 10y agoComputers are good at tracking dependencies. It seems silly particularly in this case because Rust is harder to use than a garbage-collected high-level language exactly because it is trying to squeeze out these last optimizations, and then we turn those optimizations off because it's... what, too hard to automate rebuilding some binaries? It's as if they mandated you write your apps in Python because they didn't want to spend time compiling C apps.
- goodplay 10y ago
- moosingin3space 10y agoDo you think it would be reasonable to package rustup in the Fedora repos? I ask because for a development machine, it makes more sense to be able to install multiple toolchains in parallel.
- snuxoll 10y agoIn the repos directly? No, probably not. rbenv and pyenv aren't in the repos either, I'm not aware of any specific policy against it but it introduces some hesitance to provide software in the repos that can be used to then install software that may conflict with software managed by the package manager itself. rubygems, setuptools/pip and cargo as examples only typically handle installation of libraries and are generally "well behaved" citizens that put files in specific locations and don't install or manage new versions of the underlying language runtime, meanwhile rbenv/pyenv/rustup can mess with your path and potentially cause conflicts that could end up with people filing bugs that are closed "not our problem, we support this one specific environment that's in the repos". Someone is welcome to try, feel free to open a thread on the fedora-devel mailing list and see what anyone else thinks. But even if rustup doesn't make it into the official repos I don't see why someone couldn't put it up on COPR.
- tmzt 10y agoCould rustup use PackageKit/yum/dnf to do this on Fedora? It would be really nice to be able to point to one command in the documentation that would work whether installed directly by the developer or provided by a distro. Debian specifically provides it's own alternatives system to handle symlinks in a global manner, but nothing for directory-specific ones. I'm not sure about Fedora. With `rustup` replacing `multirust`, it would be useful to point to a common command that in turn would call the distro-provided facility for global links. Also, congratulations on 1.10! Looking forward to servo.apk in the coming weeks as well.
- snuxoll 10y agoAs an addendum, there's nothing preventing anyone from packaging multiple versions of Rust assuming it properly supports it (for example installing to /usr/bin as rustc1.10, then we can symlink /usr/bin/rustc to the most recent one) - and if Rust releases a 2.0 at some point it is likely that there will be multiple versions available for a release or two while programs are modified to be compatible with the newer release. However, as Rust is fairly commited to semver I don't see much use in this UNTIL there is a new major release.
- dikaiosune 10y agoExciting! Tongue-in-cheek, it's very exciting that distros will now have an easier time patching Rust and producing bugs like this one: https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/256797 https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/25679...
- reubenmorais 10y agoI've tried for a few minutes, but I can't understand Launchpad. How do I find the code changes associated with that bug? I want to see the fix…
- pietroalbini 10y agoYeah, Launchpad has not the greatest UX. In the last comment [1] on the bug, it's mentioned the release in which the fix was released. From its page [2] you can see all the details of it, including its diffs. [1] https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/256797/comments/9 https://bugs.launchpad.net/ubuntu/+source/gcc-4.2/+bug/25679... [2] https://launchpad.net/ubuntu/+source/gcc-4.2/4.2.4-1ubuntu3 https://launchpad.net/ubuntu/+source/gcc-4.2/4.2.4-1ubuntu3
- reubenmorais 10y agoI looked at that, and eventually found a reference to the Launchpad bug in this 500KB patch[0]. It says: + * Fixes included in the 4.2.4 upstream release (compared to 4.2.3-3ubuntu7): + - Fix LP: #256797, wrong-code on ia32, taken from the gcc-4_2-branch. Which makes it sound like the problem was in GCC, not the Ubuntu package. I was under the impression that the bug was caused by an Ubuntu-specific patch, from dikaiosune's comment. Am I missing something? Edit: Ah, so the fix was added in 4.2.4-1ubuntu1, not 4.2.4-1ubuntu3. Which narrows the actual source changes to something inside this other 500KB patch[1]. From here I looked at the upstream changes using GitHub compare[2] (warning, big page). I ran a one liner in the JS console to expand all the "…" buttons next to the commit messages so I could search for relevant text, which lead me to this commit[3], which seems to be the actual code changes to fix that particular bug. That finally lead me to the bug in GCC's bug tracker[4]. I don't know if I have just been very lucky with the open source projects I've collaborated with, but this journey to find where a bug was actually fixed seems completely insane to me. Is all this info passed down from maintainer to maintainer just via folklore? Crazy. Oh, I almost forgot about what I actually wanted to know. This looks like a GCC bug that wasn't caused by Ubuntu specific patches, so I don't know what dikaiosune wanted to say. [0] https://launchpadlibrarian.net/18364478/gcc-4.2_4.2.4-1ubuntu3.diff.gz https://launchpadlibrarian.net/18364478/gcc-4.2_4.2.4-1ubunt... [1] https://launchpadlibrarian.net/17472542/gcc-4.2_4.2.3-2ubuntu7_4.2.4-1ubuntu1.diff.gz https://launchpadlibrarian.net/17472542/gcc-4.2_4.2.3-2ubunt... [2] https://github.com/gcc-mirror/gcc/compare/gcc-4_2_3-release...gcc-4_2_4-release https://github.com/gcc-mirror/gcc/compare/gcc-4_2_3-release.... [3] https://github.com/gcc-mirror/gcc/commit/80cacf54c3d410d5552b2bf262bc9ac5dc6a1e05 https://github.com/gcc-mirror/gcc/commit/80cacf54c3d410d5552... [4] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35163 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=35163
- rustc 10y agoHow's the MIR stuff going on? Is there an ETA on when MIR will land in beta/stable? Will the incremental compilation work start after that?
- steveklabnik 10y agoMIR is still going well. To be clear, it's already landed, and has been working, it's just not the default yet. There's a PR https://github.com/rust-lang/rust/pull/34096 https://github.com/rust-lang/rust/pull/34096 and there are currently three blockers: https://github.com/rust-lang/rust/milestone/29 https://github.com/rust-lang/rust/milestone/29 Incremental compilation has been worked on while MIR development was happening, so it won't start, it's already in-progress. :)
- moosingin3space 10y agoDoes this imply we should see single-crate compile times improve?
- steveklabnik 10y agoWhich part? With MIR, yes, the idea is that compile time should improve. One of those tracking bugs is to make sure that it doesn't regress before turning it on by default. With incremental compilation, you should see compiles after the first improve; you'll need to compile a lot less code for each change. Right now, the entire crate is recompiled, but afterwards, just the portion that changed will need to be.
- moosingin3space 10y agoMy understanding of compilers is somewhat limited, but I'm curious how the compiler can detect "just the portion that changed", given that Rust does heavy inlining.
- dikaiosune 10y ago
- outworlder 10y ago> Rust is implemented in Rust, which means that to build a copy of Rust, you need a copy of Rust. This is commonly referred to as ‘bootstrapping’. Historically, we would do this by “snapshotting” a specific version of the compiler, and always bootstrapping from that So, does that mean that Rust (has/will have) issues regarding binary blobs in pure free software Linux distributions?
- steveklabnik 10y agoIn a certain sense, yes. But in reality, no. There's both rustc and cargo packages in Debian unstable, for example. In my understanding, distros are willing to accept a single initial blob. They use that to build the initial package, and then build their own packages from that forever after.
- cyphar 10y agoDebian isn't a pure free software distribution (they have non-free repos run by the project). Does Trisquel or gNewSense have rustc or cargo packages?
- steveklabnik 10y agoAh, sorry, I always forget about that. I haven't heard of any. But we are purely free software, so...
- cyphar 10y agoI know, I was just saying. By the same token, Go has the same problem (you need to use an old version of the compiler to build the current version). Though, I kinda wish that the problem was solved the same way that GCC solves it (you write a simple compiler in Assembly and then use it to bootstrap the full GCC toolchain which you then use to compile an optimised version of the GCC toolchain). Requiring an older binary of the compiler is an annoyance (and AFAICS would make porting harder).
- Narishma 10y ago
- parley 10y agoI'm really looking forward to when rustup.rs is stable (atleast for Linux)! I'm trying to push Rust at work, and it's one of those polishy things that would help. Unfortunately, last time I checked development (on issues blocking the initial stable release) seemed to have slowed as of late, but I should be helping out instead of whining - the Rust community is doing great work!
- kibwen 10y agoSummer is definitely a slow time for us, lots of folks taking well-deserved vacations and lots of effort being diverted into organizing our three Rust conferences taking place this year, which I might as well plug while I'm at it: RustConf (Sep 9-10, Portland): http://rustconf.com/ http://rustconf.com/ RustFest (Sep 17-18, Berlin): http://www.rustfest.eu/ http://www.rustfest.eu/ Rust Belt Rust (Oct 27-28, Pittsburgh): http://www.rust-belt-rust.com/ http://www.rust-belt-rust.com/
- yeukhon 10y agoDoes the general admission ticket cover both day 1 and day 2 for Rust Belt Rust? Sorry for hijacking. I have issue with getting response from organizers from other conferences in the past so thought I would just leave an ask here.
- steveklabnik 10y agoI checked with the organizer, and she said "yes" and also that she definitely answers emails, if you or anyone else has further questions.
- ssebastianj 10y agoI've just upgraded from Rust 1.8 -> 1.9 -> 1.10 using rustup.rs without any issue (at least I didn't see any issue :P). I'm on Ubuntu 16.04 amd64.
- moosingin3space 10y ago
- dfdfghhhfgh 10y agoThe marketing of Rust programming language has been excellent. Hats off for having pulled off something like this.
- pjmlp 10y agoCongratulations on the work. Very nice to see the push for relying only on stable releases while building Rust.
- pjmlp 10y agoCongratulations on the work. Very nice to see the push for relying only on stable releases while building Rust.
- yarper 10y agoWhat amazes me, is all this cool stuff but a Rust process still can't return an exit code [0] without using a workaround. I actually use Rust in production, and have generally found it very good - compared to the well discussed difficulties with CPP. I will continue to do so, but I think that the edges really need covering off properly before it'll be treated as a serious competitor to CPP (and equally often, Go). [0]: https://github.com/rust-lang/rfcs/issues/1176 https://github.com/rust-lang/rfcs/issues/1176
- tveita 10y agoCalling std::process::exit doesn't seem like much of a "workaround"? That's basically the same as Java, which is doing OK as a language. https://doc.rust-lang.org/std/process/fn.exit.html https://doc.rust-lang.org/std/process/fn.exit.html
- yarper 10y agoThis is true! Perhaps my comment was a bit in haste, however there's a lot of caveats with "exits" rather than returns which complicate the matter, for example in Java System.exit can fail (and finizalizers may or may not be run). On top of that you have to type System.exit all the time, which is quite annoying
- progman 10y agoCongratulations! Are there any plans to support bootstrap from source? Currently any install requires a binary Rust compiler. I like the way how Nim handles the bootstrap. It's always easy, and it also eases ports to other platforms significantly since everthing is coded in C.
- steveklabnik 10y ago> Are there any plans to support bootstrap from source? The source code is fully available, so we are/have "bootstrapped from source", it's just much more convenient to not do it yourself. We don't have any more significant plans to change things in the near future.
- wldcordeiro 10y agoWasn't the old bootstrap basically just pointing to specific commits to rust rather than tagged prior releases? I remember the servo repo doing something like that and maybe the Rust one as well (cloned it but have yet to build rust on my system from source!)
- steveklabnik 10y agoYes, they were specific SHAs, rather than releases.
- wldcordeiro 10y agoThought so! Know if servo is joining you guys on the build from a release train?
- steveklabnik 10y agoWell, Servo is a bit different, given that it's not a rust compiler, so there's no 'bootstrapping' component. Until Servo stops using nightly features (which may not be ever, given that they are part of how we test new features!), they'll need to stick with a nightly build. We made an exception for the compiler when compiling itself, but won't make any more.