It's not mentioned in the post, but 1.8 also includes support for installing additional versions of the stdlib for other targets using rustup/multirust[1], which is huge for cross compilation:
Yeah, I didn't mention it in the post because rustup is still in beta. Once it's officially ready to go, trust me, I will start talking about it a lot :)
I wonder if in the long run it will be possible to generate an Android APK without having the Android NDK/SDK installed. Since it could link against the Android's stdlib.
Though, I guess Android NDK uses a custom toolchain, linker, so it might not be that easily achieveable. Though it will give Rust an advantage over other newcomers. Crosscompilation for multiple OS'es/Architecture seems like a big selling point.
This is definitely going to be big for enabling cross compiling. I've been fighting to get things working sanely. Is there any info on how one would build a new stdlib/corelib for a target? I'm actually anxious to see how much it might help to be able to use Rust on small ARM processors.
We don't have great docs on it yet. https://github.com/japaric/rust-cross is some info. Once we have stuff all in place exactly as we want it, I will be working on good docs to make it much easier for people, but it's still a bit wild-west at the moment.
Good to know that docs will be forthcoming. that link is where i've been working from, and it will usually work but sometimes when i'm upgrading rust it'll just magically not work and i've never figured out why, hence the wild west as you put it. It's definitely looking more and more awesome to be able to get that stuff working.
Are official rustc and cargo releases to be expected for running natively on the tier2 platforms (e.g. official rustc for Linux on ARMv7 that targets Linux on ARMv7)?
It's probably not out of the question, though are there a lot of people out there who want to actually develop on e.g. Android rather than just targeting it?
My laptop is armv7 linux, and not being able to run rustc on it has been annoying. Well, I did find some binary of some old version somewhere, but it's of limited usefulness since it's old, and it didn't come with cargo, which also wants to bootstrap itself from a native binary. The last time I tried it, I couldn't even cross-compile an ARM rustc from x86_64, because the build scripts wanted to run the binary they were building. This is literally the only reason I've been using C and not Rust (which would have been a much more suitable language) for my latest project.
EDIT: Huh. I guess they do have binaries for arm linux now, at least for nightly and beta versions, as of literally two days ago.
Having just acquired a pixel c tablet, I am increasingly looking forward to being able to iterate on my rust projects while being highly mobile. I don't see it as a primary development platform in the near future, but absolutely invaluable as an auxiliary one.
The last time I checked android compiling looked very complicated, tons of steps, tool chain setup for Windows. I hope one day it's as simple as flagging the build for the specified architecture.
rustc/cargo support any target for which a Rust stdlib is distributed, but you are left on your own to install and manage other software which will be needed to do the compilation such as a C cross-compiler for the target, etc. This is much more troublesome for some combinations of host/target than others. Personally, I have yet to get OS X --> Linux working, but Linux/glibc --> Linux/musl was pretty easy.
They should probably change their terminology away from "RFC" for referring to Rust RFCs rather than IETF ones. Maybe RRFCs or REPs something?
In this document is a perfect example of the problem, they list several Rust RFCs by RFC number, then talk about IP RFC based loopback detection, expecting everyone to know that RFC 6890 refers to an IETF one and not a Rust one. I mean, most of us can infer that just by length of the number, but it is pretty ambiguous especially when they're used in the same document like this.
I have the same thought running through my head while perusing each Rust announcement. Python has the Python Enhancement Proposal[1], and Bitcoin has their Bitcoin Improvement Proposal[2]. On the flip side, this does have the side effect of forcing me to click through to each Rust RFC linked in the announcements just to be sure.
I'm fine with projects locally using "RFC" for their own purposes, but you're correct in that once you start referring to other concepts with the same initialism one should explicitly say "IETF RFC". Namespacing matters. :)
Ember.js uses a similar naming convention. I'm not sure that it's that important to distinguish from IETF RFCs. Especially since the RFCs are linked in that document.
Rather than changing the name (and then me having no idea what a PEP or BIP or whatever is until I look it up—not a good way for a piece of language to work), I'd suggest namespacing the number. "RFC rust/1386" or somesuch.
I've been using Rust more and more for my personal projects. Frankly, I could not give a hoot about the memory management; it's pretty cumbersome to deal with. What I love about Rust is that it's a low overhead language that uses interfaces. I love interfaces! I honestly think that they're the best way to program.
I'm glad you like it :) I'm happy to see more emphasis on the productivity-related aspects of Rust. I talk about memory safety a lot because people ask questions like "what one feature makes you different from C++11?", but the productivity-boosting features like traits and Cargo are just as important in my mind.
The importance of Cargo / crates.io cannot be understated, I think.
I've found myself using Rust for little one-off tools and scripts lately because it's so darn easy to type `$ cargo new --bin foobar` on any of the three operating systems I use daily.
There's already a pretty nice ecosystem of web servers, graphics libraries, crypto libraries, etc. -- Not to mention the bindings to existing libs.
At the end of the day I always end up with wicked fast binaries that I can run on Windows, Mac, or Linux with fairly minimal fuss.
---
I really haven't found a language that hits this niche the way Rust does, which is really strange to me considering Rust's mission statement.
No shell scripting language is that easily portable barring something like MinGW.
I've never had what I'd call a pleasant experience using Ruby, Python, or Javascript on Windows. Not to mention if the language runtimes / stdlibs don't demand it: many of the 3rd party libraries assume a *nix toolchain to build all the C extensions.
Go and Java probably come the closest to writing easily portable software, but I personally find writing Rust to be a more fulfilling endeavor.
---
The other day I wrote a tool to deduplicate my image library in Rust. The first binary to compile worked perfectly on both Mac OS and Windows, ran wicked fast (on my SSDs anyways), and it was really a pleasure to write. -- Rust's iterators alone really make for some beautiful code.
---
This was a really long-winded way of saying I love Rust, and thanks for all the hard work ^^,
I've actually found python3 to be surprisingly pleasant on windows (10), while go has been just ok. I think it is mostly a culture thing: python has a long history of cross-platform, and I think the odds are better that some utility written in/ported to python3 will use the various facilities python provides for "just working" cross platform. It also helps that python3 made virtualenvs part of the standard library.
With go, I think it's easier to accidentally end up with some kind of not-quite-portable thing, despite the fact that go is a new language.
Interesting (and good!) that you have such a pleasant experience with Rust too.
> The other day I wrote a tool to deduplicate my image library in Rust.
Hm, did you by any chance share that somewhere? I'm planning to do some reinstalls and consolidation of storage, partly from having several machines, and partially from dual-booting (having extra file-systems). I'll probably figure it out with find and xargs or what-not, but a Rust-binary would be a welcome change of pace :-)
> No shell scripting language is that easily portable barring something like MinGW.
> I've never had what I'd call a pleasant experience using Ruby, Python, or Javascript on Windows.
Perl is probably the tool you are looking for. There are official technet articles about how to use Perl on Windows. Older, now that powershell exists, but they're there.
If you're already familiar with Ruby I imagine it's not too hard to pick up most most of what you would want to know (except context! Probably the most important thing in Perl to grasp coming from other languages).
Out of curiosity, what methods did you use for image dedupes? Simple file hash, or something more complex to find e.g. watermark vs no, different crops/scales, etc.?
At the moment it is just hash based, which actually remedied most of my immediate problem. (I have 8 drives in my workstation. Many of them are donors from computers long gone. [Portions of] my image library have just been copied around many times without much rhyme or reason. Now it's centralized and properly backed up.)
I did think about comparing images by similarity but ultimately tabled it for a later evening because:
- I quickly realized I had a lot of reading to do
- Resolving "similar images" conflicts is a fuzzier, more time intensive process since: (a) maybe the comparison is just plain wrong?, (b) maybe it's not strictly a worse crop, but rather two common aspect ratios which you'd like to keep, (c) maybe it's not actually "watermark" text but rather it's a meme or image macro, etc.
- Personally: my real problem with images of varying sizes is that I download thumbnails by mistake. That's just PEBKAC and no amount of software can fix that.
(Now that I think about it: it might be nice to have a script which iterates over low resolution images and tries to find a large resolution version w/ Google Image Search.)
This has been one of the biggest things I've enjoyed about it as well! Building cross-platform applications is generally a nightmare. In C++ you have to figure out a build system and dependencies on your own, and also you're writing C++ which is terrible. In scripting languages you either have to require users to install the runtime or you have to use packaging tools that are of variable quality. Being able to write cross-platform code with sane package management and compile down to native binaries takes away a huge headache!
Also, the ability to add template specifiers to implementations is probably the most powerful restricted generic programming technique I've seen. For example, it fills me with joy to be able write lines like this:
// Colliders are bi-directional
impl<T, K> Collider<T> for K where T: Collider<K> {
fn intersect(&self, other: &T) -> Option(Contact) {
other.intersects(self)
}
}
What do you mean by that? Is it different than what you can do in C++ with inheritance (leaving out implementation inheritance)? I'm sure it is probably a little less verbose as the syntax in C++ is odd. C++ 11 adds 'override' which helps.
Ok ok, the actual truth is that there is no such thing as "functional languages". Rust is a good demonstration that languages that offer the ability to statically prevent bullshit are the best---and does so with a familiar syntax, familiar mutation, etc so as not to trip people's buttons.
There is no such thing as OO either, and trait objects are not super common in idiomatic Rust anyways.
I would say that it compromises between ML/Haskell-style FP and procedural. It doesn't have much to do with OO, bar trait objects, and the dot operator (which is almost entirely syntactic sugar).
It's a gateway drug to ML/Haskell-style FP because it eases you into expressive type systems, pattern matching, higher order functions, and pervasive use expressions over statements. Many people have told me that it was much easier to learn Haskell or Ocaml, etc. after learning Rust.
All I ask of a language (other things are nice but not required) is no "runtime type errors" and no data races. Haskell, Rust, OCaml give me these things.
[Slightly more formally, the first can be rephrased as "no omnipresent non-obvious partiality excluding that from non-termination".]
They aren't really comparable. Rust is a lower level language that primarily competes with C++ (finally! C++ badly needs the competition). C++ is still around because it is one of the few languages that has a pay-as-you-go model to features and is not GCd, so, you can reasonably do things like write embedded software for micro-controllers, or kernels, etc.
Go, Python and Java (or any JVM language) are all high level garbage collected languages that focus on developer productivity. You pay certain costs just as the price of entry, like garbage collection, and the requirement for a fairly hefty runtime. In return you get various useful features.
Examples:
You would not use Rust to write a large complex webapp as part of a corporate team, that spends most of its time talking to databases or message queues. The best tool for this from your list would be Java.
You would not use Rust to write a small script to do system administration tasks or quickly prototyping a new idea. The best tool for this from your list would be Python.
You would not use Rust to write a small, simple command line tool that nonetheless could benefit from being garbage collected. You could use Go for that (I hesitate to say it's the best tool but plenty of people use it in that way).
Yup. Think of Go as a compiled Python/Ruby/etc.-family language; think of Rust as a fixed C++ with some influence from functional programming.
Possibly some of the reason people think they're similar is that Google's internal use case for C++, as I understand it, involves writing things like HTTP API servers in it—things that the rest of us would write in Python/Ruby/etc., or Java. And they do things like statically link the resulting binaries and deploy them in containers. So Go is replacing C++ at Google, but that doesn't have a huge overlap with what the rest of us would consider C++ for. Rust is more suited than Go for many of those use cases (embedded software, kernels, ABI-compatible replacements for things in existing operating systems, etc.).
The other reason is that Rust 0.x once had features that were pretty similar to goroutines, a garbage collector, etc. Those were all removed before 1.0, but the impression still lingers.
Actually, once the ecosystem is fully there (probably ~6 months to a year), Rust would make a great contender for a complex, large web app. The type system Rust uses alone is worth it...
I'd just note that Rust isn't that hard to use for higher-level stuff. I am working on a network search engine (capture all traffic, index, search). At first I though I'd just write the capture agents in Rust, maybe some of the PCAP-storage stuff. Then write the entire query engine in F#. More and more, I'm realising I can write a much larger portion in Rust, and leave F# for the parts where performance totally doesn't matter (mainly interfacing with the end-user). It's pretty amazing.
I have found that using Go for system administration tasks could be more productive than Python. Go static types help to discover typos quicker and even with Go 1.5 small programs compiles and start faster than Python starts a script doing the same.
I'm curious as to what makes you think that Java is preferable to Go for a large webapp that "spends most of its time talking to databases or message queues".
I would have thought that the Go's concurrency model would give it an edge.
> I'm curious as to what makes you think that Java is preferable to Go for a large webapp that
because your large webapp is made by a large team, over a large time span. The same as you don't deploy on power8 but on x86, because x86 is more common than power8 and cheaper.
One of your java programmers leave ? replace him is easy
Need to find java programmers ready to do shitty and boring debugging ? easy
Your large webapp is in maintenance mode and nobody internally wants to touch it, so you decide to find a cheap company abroad to outsource the maintenance ? easy
Hard to find these three with Go (or rust, and I love both) because right now it's taught in no large scale university nor a lot of people have been exposed "accidentaly" by it. SO if you have been exposed to Go (or rust) and decide to stik with it it's because you actively decide to, not just because of market force. Hence so you don't belongs to those who will want to do shitty bug fixing 8 hours ago, nor to the price of a developer people hire just to have two more hands, nor the kind who will accept a job under-payed for a outsourcing company.
Java, permits your management to feel they can scale the development
Not that this invalidates your point, but there are two university classes being taught in Rust right now; I had the pleasure of guest lecturing at Penn's yesterday, in fact. Here's hoping to more of those in the future.
ah great to know ! I also hope to see more in the future.
here I was playing the devil's advocate, but to have been at both seat (having hard time to hire as a CTO and needing to fallback on PHP in one company / trying to push Rust in my current one) I now see why chosing a stack is not only about tehcnical merits.
I think the key word is "shitty". If you're working on a shitty app then aim for shitty languages with developers that don't care.
Hopefully we aim to not work on such shitty apps. And in such a case, the overhead of learning a new language is dwarfed by the overhead of learning the domain-specific stuff.
And Rust, like any good language seems to have a, coherent(?), or elegant design. Stuff makes sense. As compared to some languages where things are just thrown in willy-nilly. This makes Rust easier to learn, as you can somewhat reason about how things must work.
last time i tried to do serious work with go and mssql, i ran away screaming. maybe situation isn't that dire now (this was almost a couple of years ago), but it's hard to beat java in db connectivity.
I've used Go in a lot of database work as of late, and it's done a fine job for me. I've used it to connect to MS SQL, PostgreSQL, and Teradata. The Teradata connection was a little tricky, as nobody had written a Go/Teradata driver yet and I had to route it through Windows ODBC, but once I had that sorted out it worked just fine.
I only started using Go in the last couple of years, so I don't know how different it is now from when you tried it last, but I bet you would be pleasantly surprised if you gave it another look.
Here's my perception of Rust: It is a system's low level language (more like C or C++) that is very expressive. It's performance is compared to C++, so faster than Go/Python/Java.
----------------------------------------
In term of expressiveness, it offers:
- Expression-based languages (instead of statement-based)
- Has anonymous functions (lambdas)
- It has a match mechanism which is powerful
- Enums are enumerated data-types rather then integer types
- Has traits and explicit implementation blocks for them (vs Go's implicit interface contracts)
----------------------------------------
Other than that, it also offers:
- Built-in concurrency
- It has a thing called the borrow checker that makes sure you're handling memory safely (this will get a little but of getting used to, but it is powerful)
- Everything is private by default. You put `pub` in front of an identifier if you want it to be public
- It isn't very verbose in the Java sense, but you still have to write a crap lot of code in comparison to Go and Python. The trade off is that the code is very explicit, and you get to type more in order to have zero cost abstractions at runtime
- Zero cost abstraction at runtime
Please correct me if any of those points are wrong/misleading, I'd love to learn more about Rust too.
This is a bit misleading, rust does not come with concurrency out of the box. The compiler is able to infer some basic properties of your program to ensure that it is 'concurrency safe'[1] any additional concurrency features are offered through libraries that mostly wrap C libraries. The std lib only comes with system threads, and some basic primitives like mutexes and channels. However, because of these features its fairly easy to build libraries that offer concurrency primitives. For example, `mio`[2] can be used for async socket programming, `rayon`[3] can be used for some parallel computation.
It's more like "We designed the type system to take concurrency into account, and then provided various types ourselves in the standard library (like Send/Sync) to be used with them. We also provide a bunch of concurrency abstractions and tools, in the standard library, but due to the guarantees being more in the type system, others can also write their own. Some of these do rely on OS-level capabilities as well.
In general, very little of Rust is technically "in the language", but to the user, something in the standard library vs the language itself often doesn't matter, it's the same experience either way.
That's very insightful. So my understanding now it that Rust provides low level "blocks" that, as a whole, is an extensible language. Thus language vs standard library doesn't really matter, since Rust = Language spec + standard library. Am I getting close to its definition?
BTW, I remember in the alpha days when the decision was made to make Rust support concurrency in the standard library rather in the language itself. So in that sense (Rust = language spec + stdlib) Rust does have concurrency built-in.
Well, using Rust without the standard library is a big use-case: stuff like device drivers, OSes, embedded, things like that. So to some users, it matters. But there's little use overly qualifying what you're talking about when you're just talking, so someone might say "Rust" to mean "Rust + std + crates.io crates" or "Just the language, no standard library", based on context. But once you get into the details, it's important to get at exactly what you mean.
> So to say that a language has concurrency built-in is, in general, misleading, correct?
Languages with keywords like `volatile` and `synchronized` have concurrency built in to some degree. Similarly, languages where the concurrency/parallelism system cannot be implemented as a library (e.g. Go) have it built in. So, languages can have concurrency[1] built in; Rust doesn't.
You can duplicate Rust's core concurrency abstractions and safety requirements almost exactly in a library. Rust offers lower-level building blocks as part of the language which can be composed to provide safety from data races.
The only time Rust's stdlib concurrency system factors in to the language is in the behavior of `static mut` (it requires `Sync` types), which is a pretty niche feature and not strictly necessary for safety given that `static mut` is `unsafe` to access.
[1]: Also, "concurrency" is the wrong term to use here, too, but that's a nitpick within a nitpick
After using rust a bit I would say that unless you requirements dictate being very frugal around things like memory allocation and speed etc.. I would not use rust to write said application.
As other people have posted it seems to compete with C/C++. I am really excited about this since I think there are a lot of problems with C++ we just don't see them because there is no competitor.
For example in C++ reflection and interfacing to other higher level languages is awful. I am hopefully with rust we can do better! That might really open up rust a lot of uses for rust as a language.
Another area where rust is different from python and java: the rust crates in the wild still seem like a wild west of 0.x version packages that break frequently (at least for games programming). It is a great opportunity to contribute to OSS but can also be frustrating.
My recommendation: if you have a pet project unix daemon or CLI tool you wanted to make try it with rust. Most of the rust standard library seems to have stabilized and is nice to use now. For complicated applications be prepared to contribute upstream fixes to crates and bring lots of patience :)
Nitpick: GC is technically optional in Rust, because you can stick pretty much anything in a reference-counted box or an atomically-reference-counted box (Rc<T> or Arc<T>). It's not the default by any means though.
One day a student came to Moon and said: “I understand how to make a better garbage collector. We must keep a reference count of the pointers to each cons.”
Moon patiently told the student the following story:
“One day a student came to Moon and said: ‘I understand how to make a better garbage collector...
Nitpick: Rust includes a GC. Box<T> is reference counted, although the reference count is always 1 until it is released by the owner, then it reaches 0. The reference counts are inferred statically for the most part.
No, if you conditionally move a box, there needs to be runtime checks for whether that condition occured when in it goes out of scope. (note that reassignment of a variable effectively causes the old value to go out of scope -- this may have Implications for your loops, though I sure hope you aren't making and destroying boxes in a loop!)
In my experience, this is not however a significant concern.
Ooops yeah forgot about https://github.com/rust-lang/rfcs/blob/master/text/0320-nonz.... [To be perfectly pendantic, one could trade the drop flags for code bloat and have only a finite blow up and statically known everywhere, so its a "weak" form of dynamism.]
Yeah I guess you could have exponentially many statically compiled paths for each combination of drop flags... but then you're just encoding your drop flags in the instruction pointer :)
edit: this of course implies an easy program with 65 conditionally moved boxes that can't be encoded under your system.
I really wish calendar-oriented programming had taken better hold in the 80's. It's a really elegant paradigm with great separation of concerns. Being able to shard data out into timezones with inter-timezone accesses requiring a delay equal to their clock differences completely eliminates races!
Unfortunately it was pushed out by MIT's cartography-oriented zealots, and we know how well that paradigm worked out!
Yeah, Servo uses SM's GC for its javascripty things, it sort of has to. Hooking into spidermonkey to get a GC for a program where you just want a GC and not Javascript is suboptimal though.
(Note that all of these GCs use RAII under the hood, but not in the simple delete-when-destructor way)
That's a very broad question. Rust does the things that I would say are table stakes for a decent programming language these days: decent type system (similar safety to Java) with type inference (similar conciseness to Python), a sensible approach to errors (errors are values as in Go, but since Rust is a non-joke language it doesn't need to special-case errors at the language level, they're just another type of value). Its unique thing is the semi-manual (but safe) memory management, but if you needed that then you would know you needed that, otherwise it's not terribly important to you.
So it's a decent language, but there are other decent languages around these days. I tried to compare them at http://m50d.github.io/2015/09/28/when-rust-makes-sense.html . I'd look at OCaml first, particularly given their relative maturity levels, but if you really can't stand OCaml's syntax then Rust may be worth a look.
Rust error-handling https://doc.rust-lang.org/book/error-handling.html - Result is just an ordinary type defined in the language. Whereas go's "if err, res" stuff is special-cased - e.g. you can't use your own custom representation of error vs not.
I gave a talk at a conference this week called "Rust in Production". Some of the companies I highlighted included Dropbox, Skylight.io, and well, Firefox ;)
We're hoping to do more showing off of our production users in the future. Getting more production Rust in the wild is a big personal goal for me this year.
I'm not on the platform team, but my understanding is that if you're on OS X or Linux, and you grab Firefox 45 right now, there's a _tiny tiny_ bit of Rust code in there. Windows will be in 46 or 47, IIRC?
I don't think we intended to ship the Rust bits by default, but we didn't disable them for release builds, so there you go. It is pretty tiny, just a little bit of mp4 parsing code that (IIRC) we're running in parallel with the existing C++ code:
https://dxr.mozilla.org/mozilla-central/source/media/libstag...
If you run your Firefox from a console and browse sites that serve you shady mp4 files you can see the occasional panic message as it fails to parse something! :)
http://bugzil.la/1243363 is where Rust code was enabled for Firefox 45 beta/release on Linux and Mac.
If I understand correctly, having it disabled on Firefox 45 beta broke the build because of a script that tests whether the beta build config matches the nightly config. This forced a decision, and release engineering opted to enable it. So it wasn't planned long in advance, but it was a conscious decision at the time 45 went to beta.
Thanks for digging that up. I recall having the discussions where we thought we'd let it bake for a while before it shipped, but I guess it was intentional, even if a bit last-minute. :)
It's a pretty small bit of code right now, and it's not on the critical path for anything, so I don't think it's harmful.
It's a really tiny thing, but Faraday uses https://github.com/faradayio/credentials_to_env to download secure credentials from a Vault server, and write them to environment variables or files. Alternatively, you can just pass in environment variables manually and ignore Vault (for testing, etc.). This acts as glue for existing programs that don't know about Vault. This is actual production code, even if it's really minor.
The goal here was a single binary that would work on most modern Linux distributions, and which could make some HTTP calls and then exec another program, typically all from inside a Docker container.
Rust was a bit overkill for this, but we already had a couple of the necessary libraries available from in-house experiments, and it was fun to write. The two best features of Rust for this project were: (1) If the program compiled, there was a 95+% chance it would work flawlessly on the first try, and (2) Cargo was really just lovely all around.
Congratulations. Particularly, I think the Tier 1 i686 might get Rust more adoption by Windows C/C++ crowds in commercial sector. Improvements for large files in Linux might aid adoption in backup/archive and streaming servers. Just curious, did Dropbox's feedback have anything to do with that?
The Rust team has been in constant contact with the Dropbox team (I should know, I coordinated and attended the original meeting), and I can say for certain that feedback from Dropbox has helped to prioritize and inform the stabilization of several features.
Cool, cool. I figured that would be the case. Tge idea behind the questions is kind of my exploration into the many eyes idea. It mostly covers feedback from widespread, random use. Howevet, I figured a small number of smart, industrial users stress-testing a new language/compiler might provide higher than average quality feedback than even twice as many casual developers. So my advice was to try to get such testers soon as key stuff is stable.
Was the prediction accurate in that case? Sounds like it so far.
We are still working on musl as a host, it's not there yet, in my understanding. Cross-compiling to it should be easy, but that doesn't help much if you're on Alpine.
So, rustup should ask before modifying ~/.profile, this is what opam does. Also, it'd be great to have a directory listing for the rustup-setup executables, because I don't run random shell scripts piped from curl, so I had to reconstruct the URL for what the shell script would have downloaded. Anyway, I'm glad multirust functionality is getting mainlined, because it's a PITA to build many things, like for example rustup.rs, which require nightly rust features.
Yes. I might as well take the time to elaborate on the history here.
In the beginning, there was rustup. And it was good. Then, Rust matured, and we started the release channels. Now there wasn't just "Rust 0.9", there was Rust stable, beta, 1.0, 1.1... so many versions. rustup.sh wasn't really built to handle that.
And so, multirust was born. mutlirust was/is a bash-based shell script that wraps up rustup and gives you the ability to manage multiple installs of Rust. And fun things like "this project uses rust stable, but this project uses Rust 1.1" and "please update every Rust I have installed". Stuff like that.
But it was a bash script. Nobody knew that this whole Bash in Windows thing was happening. And we already have a perfectly good, general purpose programming language that runs on all the platforms Rust supports: Rust! So the multirust-rs project was begun, to re-write multirust in Rust.
And so, "rustup" was born. It's pretty much multirust.rs, but without trying to mimic the old multirust itself. There's still lots of stuff to do before it's ready to become the default way you manage rust installations: https://internals.rust-lang.org/t/beta-testing-rustup-rs/331... and https://github.com/rust-lang-nursery/rustup.rs/issues?q=is%3... And of course, many people will want to use their system package manager too. Choice is good. They also play together. But that's for another post, this one is already getting long.
It's always much preferable to have as few dependencies for bootstrapping a platform as possible. Therefore, this is a good development.
Similarly, I'm hopeful the Python requirement in the new Rust based build system for rust itself will be removed sooner than later. Building Rust already requires Rust, so what's more logical than replacing the Python part with Rust. It will definitely be easier to get going than having to install some Python modules first. Same improvement should happen in servo's build system which since a few months or a little longer depends on virtualenv.
Looks like, and I take it that there are builds for freebsd and netbsd which the bootstrapping shell script will fetch and then have the rustup.rs executable for freebsd ready. Is that correct?
Does anyone have any information about when/if we will see support for higher-kinded types in Rust? There is the RFC thread on Github (https://github.com/rust-lang/rfcs/issues/324), but I haven't been following the trajectory very closely, and a quick synopsis would be wonderful and appreciated.
Higher-kinded types are a far-future enhancement. There are several language-level features that I would expect to be prioritized far above HKT; off the top of my head: specialization (an early prototype implementation of this is in nightly), placement-new, type-level numerics, stabilized syntax extensions, and non-lexical borrows. Of those, all but the last is for the sake of runtime efficiency, whereas HKT is just about genericity and expressiveness (neither of which Rust extremely prioritizes, at least not relative to languages like Haskell).
And since most programs in any language will use that language's standard library (since that's the point of having a standard library), Rust systems in practice will not tolerate memory exhaustion. This property renders the whole system unacceptable to me.
There is already an ecosystem of packages for OS development even, and we statically know if you use the standard library or not. Many libraries that don't require it have an option to turn it off.
I understand your skepticism, but we care about this use case and are working to make it easy.
Manual SIMD intrinsics is getting there, not sure how far it has come by now:
https://github.com/rust-lang/rust/pull/27169
I'm sure LLVM does a fair bit of vectorization under the hood too of course, but not sure whether better knowledge of aliasing lets it do more or whether less undefined behavior sloppyness in Rust lets it do less of it than for C++.
Yup. There's even one cool feature we already know will be in 1.10: stable bootstrapping. You'll be able to build Rust 1.10 with Rust 1.9. And Rust 1.11 will build with 1.10. And so on and so on. This should help packagers significantly.
[1] https://www.rustup.rs/