
Announcing Rust 1.15 - steveklabnik
https://blog.rust-lang.org/2017/02/02/Rust-1.15.html
======
thenewwazoo
WHOA!

MSP430 support is HUGE. In case you don't know, that's a well-known _very_
low-power microcontroller.

edit: this might be the only current platform that's <32 bits. I know there
was some work on supporting the 8-bit AVR architecture, but MSP430 gets rust a
lot closer to super-low-power applications.

~~~
MrBuddyCasino
There is work underway to create an LLVM backend for the Tensilica Xtensa, so
Rust on the ESP32 / ESP8266 might soon be a reality!

~~~
masklinn
Probably not "soon", AVR took a really long time to get merged into LLVM, and
that's a pre-requisite for Rust support.

~~~
steveklabnik
I can't comment on timelines but I know someone has been working on AVR
support for Rust.

~~~
masklinn
Oh yeah the micro folks are definitely working on it, I meant that if work is
just starting on the LLVM Xtensa backend, the Rust merge is nowhere near, and
as example submitted that the AVR backend had taken a long time to be merged
into LLVM and still needs to be finished & merged for Rust.

------
dikaiosune
This is pretty major. In anticipation of this release, I was able to remove
all nightly feature flags from a smallish web backend which makes heavy use of
type-driven codegen (serde and diesel). Really, truly, utterly fantastic to
have stability promises for custom_derive. So excited!

!!!!!!

So excited!

~~~
realusername
Just a small question, how did you find coding in rust for your web backend,
did you encounter any major issues?

~~~
steveklabnik
I've been doing a lot of web development in Rust over the past few weeks. Same
as the parent poster; I was using beta so that I could have serde/diesel :)

I chose to go with straight-up tokio/hyper, rather than use existing
frameworks. All of the current frameworks haven't integrated it yet, because
it's only available on hyper master. (They're working on getting docs and such
going before releasing the next version.) Here's my Cargo.toml:
[https://github.com/rust-lang-
nursery/thanks/blob/master/Carg...](https://github.com/rust-lang-
nursery/thanks/blob/master/Cargo.toml)

Overall, I feel that it's pretty great. It is still extremely new, though, so
you have to be a bit comfortable with working on the bleeding edge. Also,
because there's no big framework yet, it has a more... node-ish feel, in that
you're doing a lot yourself and hooking up libraries, rather than using the
conveniences of something like Rails. But that's not too bad; I wrote a little
routing framework that also serves static content, it's about 150 lines.
Another 12 or so to wrap up handlebars into something a bit nicer to use. And
it uses so, so much less memory than my Rails apps do, and a six megabyte
statically linked binary is a dream for deployment.

I was originally quite skeptical of all of this, but as the docs and libraries
mature, I think it'll be pretty great. It won't be as easy as something like
Rails, but it's much nicer than I originally assumed.

------
GolDDranks
Congratulations! This seems an extremely important release, maybe even the
most important since 1.0. Why? The lack of the trait deriving functionality on
the stable release has kept libraries that are actually quite central to the
ecosystem, such as Serde and Diesel, using the nightly compiler – until now.

The stabilisation of the trait deriving functionality is a small step for the
compiler but a giant leap for the Rust ecosystem!

------
squiguy7
This is probably the most exciting release yet. Congratulations to the Rust
team! I'm continually impressed by the inertia this project has.

I can not wait to see what everyone will build with custom derive now.

~~~
Ygg2
Pretty sure you meant momentum, instead of inertia. Inertia is tied to mass
and not remaining static, not speed ;)

~~~
Manishearth
Former physics person here. Inertia as a technical term is literally the mass
or momentum. As a colloquial term I've also heard it used for both and in
general to mean "inability to be slowed down", but it gets used more often to
mean "inability to speed up". So it's ambiguous, but correct.

~~~
Ygg2
Yeah, but colloquially inertia "a tendency to do nothing or to remain
unchanged."

~~~
StavrosK
This is true, but, in a physics context, an object that has velocity keeps
that velocity when it remains unchanged (ie, like the GP said, it's literally
momentum).

------
JelteF
I've been hapilly awaiting this release. I have been heavily updating my rust
first Rust library so it makes use of the new derive API, so that it could be
used by stable Rust.

It adds derives for common traits such as Add and From:
[https://github.com/JelteF/derive_more](https://github.com/JelteF/derive_more).
Any remarks/tips are very much appreciated.

~~~
eridius
You've got a very obvious typo in your example code, plus a couple of missing
semicolons.

~~~
JelteF
Fixed, that's what happens when you just want to be done with writing docs.

------
eridius
Woo, std::char::encode_utf8 is now stable, I can finally get rid of the
nightly requirement for [https://github.com/kballard/rust-
lua](https://github.com/kballard/rust-lua)!

------
marcosscriven
Great to see the progress here. The one I'm really looking forward to is 'impl
trait'.[0]

My understanding is this will allow returning trait implementations (such as
Iterator) without resorting either to dynamic dispatch or leaking the concrete
type.

[0] [https://github.com/rust-lang/rust/issues/34511](https://github.com/rust-
lang/rust/issues/34511)

~~~
leshow
I thought this was already supported for free standing functions? Or is that
only in nightly

~~~
steveklabnik
Only in nightly.

Can't say when it will hit stable, but "sooner rather than later" is a phrase
I've heard.

~~~
leshow
thanks steve!

~~~
mathw
Rather keen on getting impl Trait myself. I won't have to return so many Vecs!

------
kaoD
On [https://thanks.rust-lang.org/rust/all-time](https://thanks.rust-
lang.org/rust/all-time)

    
    
        Rank  Name  Commits
        1     bors  10401
    

That bors guy is such a monster! ;)

~~~
youknowone
If you want details:
[http://ruststat.youknowone.org/](http://ruststat.youknowone.org/)

------
zegerjan
> Rust 1.15 sees an extremely eagerly-awaited feature land on stable

Hoped to read incremental recompilation there, what a tease ;)

~~~
steveklabnik
Soon! Remember, you can already try it out on the nightly compiler. Filing any
bugs that come up can help us ensure that it works well enough to stabilize.

~~~
pjmlp
Binary crates support across projects would also be nice. :)

Anyway congratulations on the work!

~~~
steveklabnik
What do you mean by "across projects"?

(and thanks!)

~~~
ibotty
I think they mean a nix-like binary cache for packages that get build multiple
times (for different projects).

~~~
steveklabnik
Ah; if that's true, it's being worked on.

~~~
pjmlp
Yep that is it.

Currently I tried to make use of the shared target directory configuration to
see if it would help.

------
leshow
Awesome! I have been stuck on nightly for so many different things because of
my dependency on serde. It's very nice to have this on stable now.

------
bfrog
Stabilizing custom derive is a massive usability improvement given the large
number of ever growing libraries taking advantage of it. This is probably the
most exciting release to me besides the 1.0 and MIR integration releases.

------
simplehuman
This is amazing. Is Rust the best developer team out there? They move quickly
and release features with a cadence I have not seen in other languages. I
would love to hear more about other languages release this way.

~~~
lessclue
Go has releases every 6 months.

------
maxfurman
Not a Rust expert by any means, this one piece of code from the example stuck
out to me: `String::from("Ferris")`. What is the difference between that and
`"Ferris"` on its own?

~~~
msbarnett
It's like in C. "Ferris" is a pointer (and length, in Rust) into the binary's
static storage segment.

String::from("Ferris") creates a pointer to a string on the heap with the
contents "Ferris".

The difference is that in C this distinction is implicit, so you can
accidentally try to modify the string in static storage, which is undefined
behaviour, whereas Rust treats these distinct things as distinct types.

~~~
panic
This makes C's approach sound worse than it really is: in practice you'll
either get a compiler warning or a segfault, not the potential nose-demons
typically associated with undefined behavior. C also gives you a type-level
way to track static strings (the const qualifier) though it isn't as strictly
enforced.

------
Perceptes
This is the real Rust 1.0 for me. So excited!! For anyone that has been
hesitating to try Rust, I wholeheartedly recommend that you dive in now.

------
joseph
Looking forward to trying this out on my Rust learning project[1]. It should
be nicer to use serde without the extra code generation step.

1\.
[https://github.com/rjosephwright/saytshen](https://github.com/rjosephwright/saytshen)

------
shmerl
Installing out of distro Rust on Linux in custom location became rather
difficult, and it's not a well documented process. Previous installer was much
neater, since it was installing Rust globally.

------
flukus
So these procedural macros, would it be fair to characterise them as compile
time reflection? It seems like these get used in the same way reflection does
in other languages.

~~~
steveklabnik
In some sense, yes.

------
the_duke
Yay, custom derive is stable.

------
wyldfire
Nice, I like the look of custom derive.

I've been using x.py/rustbuild since just after it was committed and it's been
a pretty good experience so far.

------
mayhew
Great to see custom derive landing in stable. Big thanks to Mozilla and
everyone else working on improving Rust!

------
Siecje
So it seems cross-compiling is supported now?

~~~
steveklabnik
It has been for a very long time.

------
EugeneOZ
:

~~~
steveklabnik
Have you filed a bug?

