9 ms·
Announcing Rust 1.15
- thenewwazoo 10y agoWHOA! 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.
- vvanders 10y agoYeah, in light of how hard AVR is to get over to LLVM it's really encouraging to see MSP430 support.
- masklinn 10y agoMSP430 has been in LLVM for a very, very long time though, since 2010 or so.
- smaddox 10y agoIs there a good solution for getting the code onto a chip? Last time I tried with the open source GCC stack, I eventually gave up and installed the painfully large (~1GB) IDE from TI.
- eckzow 10y agoI don't know if I would call it "good" but if you're willing to settle for "official" there is http://www.ti.com/tool/MSP430-FLASHER http://www.ti.com/tool/MSP430-FLASHER which will work with TI's own MSP-FET on all three major OSs. Accepts a .hex so you can use whatever toolchain you want.
- pjmlp 10y ago> I eventually gave up and installed the painfully large (~1GB) IDE from TI. Is it still C++98 only?
- MrBuddyCasino 10y agoThere is work underway to create an LLVM backend for the Tensilica Xtensa, so Rust on the ESP32 / ESP8266 might soon be a reality!
- pjmlp 10y agoThere is nothing that I could do with them, but I love their specs, specially when I think about my first MS-DOS computer. So I imagine there would be lots of nice maker opportunities when that support comes out, not only for Rust, but for other LLVM frontends as well.
- MrBuddyCasino 10y agoTotally, I like to think of them as this generations C64, though some might argue that the Arduino Uno or the Raspberry Pi deserve that title.
- jononor 10y agoDo you know of any place one can track this work? Best reference google brought me was https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk/gcc/config/xtensa/ https://llvm.org/svn/llvm-project/llvm-gcc-4.2/trunk/gcc/con... - but pretty hard to decipher current state from that...
- MrBuddyCasino 10y agoGot that directly from an Espressif employee as inofficial info, but it has since been confirmed: https://twitter.com/buddy_casino/status/824299718104743938 https://twitter.com/buddy_casino/status/824299718104743938 So I guess its not in the open right now. I wonder if its going to be specific to their chips, because the Xtensa architecture is highly configurable and so there isn't really a single target, but potentially many.
- masklinn 10y agoProbably not "soon", AVR took a really long time to get merged into LLVM, and that's a pre-requisite for Rust support.
- amenghra 10y agoFor example, the MSP430 was used in Square's early credit card readers to encrypt the mag stripe data.
- samlittlewood 10y agoFun fact - the MSP430 ISA is based on the PDP-11 ISA.
- pryelluw 10y agoDo you have a source I could read? This is super interesting.
- bryanlarsen 10y agoSo was the Motorola 6800. I think it would be more surprising if they did everything from scratch rather than modelling it on some pre-existing work... https://en.wikipedia.org/wiki/Motorola_6800 https://en.wikipedia.org/wiki/Motorola_6800
- deleted 10y ago[deleted]
- samlittlewood 10y agoBest independent source I can find is http://www.cpushack.com/CPU/cpu4.html#Sec4Part14 http://www.cpushack.com/CPU/cpu4.html#Sec4Part14. I noticed whilst writing a verilog implementation - seeing the @PC+ relative modes for immediate data made me dig out my PDP-11 reference card. The number of addressing modes has been halved, gaining a bit for register encoding, and the status register is now in the register file (R2), and R3 is used to generate various constants depending on mode. Compare and contrast: * https://en.wikipedia.org/wiki/PDP-11_architecture#CPU_registers https://en.wikipedia.org/wiki/PDP-11_architecture#CPU_regist... * https://en.wikipedia.org/wiki/TI_MSP430#MSP430_CPU https://en.wikipedia.org/wiki/TI_MSP430#MSP430_CPU
- pryelluw 10y agoAwesome, thanks.
- leshow 10y agoAwesome! 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.
- dikaiosune 10y agoThis 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!
- ekidd 10y agoYes! We have a bunch of Rust apps at work, and just one of them was still on nightly, and now we can move that to stable, too. And we can get rid of a bunch of build.rs scripts elsewhere, which is always nice.
- realusername 10y agoJust a small question, how did you find coding in rust for your web backend, did you encounter any major issues?
- steveklabnik 10y agoI'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/Cargo.toml https://github.com/rust-lang-nursery/thanks/blob/master/Carg... 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.
- zegerjan 10y ago> Rust 1.15 sees an extremely eagerly-awaited feature land on stable Hoped to read incremental recompilation there, what a tease ;)
- steveklabnik 10y agoSoon! 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 10y agoBinary crates support across projects would also be nice. :) Anyway congratulations on the work!
- steveklabnik 10y agoWhat do you mean by "across projects"? (and thanks!)
- ibotty 10y agoI think they mean a nix-like binary cache for packages that get build multiple times (for different projects).
- steveklabnik 10y agoAh; if that's true, it's being worked on.
- pjmlp 10y agoYep that is it. Currently I tried to make use of the shared target directory configuration to see if it would help.
- squiguy7 10y agoThis 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 10y agoPretty sure you meant momentum, instead of inertia. Inertia is tied to mass and not remaining static, not speed ;)
- squiguy7 10y agoI guess I meant it in the context of it has a lot of velocity and is continuing so. But I agree :)
- Manishearth 10y agoFormer 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 10y agoYeah, but colloquially inertia "a tendency to do nothing or to remain unchanged."
- Manishearth 10y agoLike I said, it depends. Colloquially it is also "inability to slow down". The "inability to speed up" is more common, but it doesn't invalidate the first one.
- StavrosK 10y agoThis 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).
- wyldfire 10y agoNice, 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.
- the_duke 10y agoYay, custom derive is stable.
- JelteF 10y agoI'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 10y agoWoo, 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 10y agoGreat 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 10y agoI thought this was already supported for free standing functions? Or is that only in nightly
- steveklabnik 10y agoOnly in nightly. Can't say when it will hit stable, but "sooner rather than later" is a phrase I've heard.
- maxfurman 10y agoNot 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?
- tyleraldrich 10y agoString::from("Ferris") returns a String object (https://doc.rust-lang.org/std/string/struct.String.html https://doc.rust-lang.org/std/string/struct.String.html) whereas "Ferris" on its own is a primative "str" (https://doc.rust-lang.org/std/primitive.str.html https://doc.rust-lang.org/std/primitive.str.html)
- steveklabnik 10y agoString literals have the type "&'static str", that is, an immutable reference to a string that lives for the entire program. As a reference, it doesn't have ownership over its contents. String is a growable, changable, string type. String::from will convert a &str to a String. It does have ownership over its contents. String is needed here because when you read something at runtime, you're not going to have a literal, of course. But when you're creating something from a literal, you'll have to convert it to a String. For a _much much_ more in-depth explanation that you don't need a _ton_ of Rust knowledge to understand, see http://rust-lang.github.io/book/ch04-00-understanding-ownership.html http://rust-lang.github.io/book/ch04-00-understanding-owners... (and its three sub-sections)
- killercup 10y agoThe literal `"Ferris"` is a slice, i.e. a (const) pointer, which in this case will even point a part of to the data section of the binary. The String version is dynamically allocated and can be changed, can grow, etc.
- IshKebab 10y agoIt's like `const char[]` vs `std::string`.
- moosingin3space 10y ago
- kaoD 10y agoOn 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! ;)
- steveklabnik 10y agobors works very hard on every release. Bots are people too! :p
- youknowone 10y agoIf you want details: http://ruststat.youknowone.org/ http://ruststat.youknowone.org/
- Siecje 10y agoSo it seems cross-compiling is supported now?
- steveklabnik 10y agoIt has been for a very long time.
- EugeneOZ 10y ago:
- steveklabnik 10y agoHave you filed a bug?
- flukus 10y agoSo 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 10y agoIn some sense, yes.
- mayhew 10y agoGreat to see custom derive landing in stable. Big thanks to Mozilla and everyone else working on improving Rust!
- bfrog 10y agoStabilizing 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 10y agoThis 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 10y agoGo has releases every 6 months.
- GolDDranks 10y agoCongratulations! 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!
- Perceptes 10y agoThis 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 10y agoLooking 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
- crankshift 10y agoHas Steve killed himself yet?
- shmerl 10y agoInstalling 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.