21 ms·
Announcing Rust 1.0 Alpha
- im2w1l 12y agoGreat news! Have been waiting for 1.0 to jump into rust. Anyone knows when the final 1.0 will come?
- steveklabnik 12y agoTL;DR: twelve to eighteen weeks. Possibly more six-week increments after that, depending on how we feel during beta. Full details: http://blog.rust-lang.org/2014/12/12/1.0-Timeline.html http://blog.rust-lang.org/2014/12/12/1.0-Timeline.html
- slowmovintarget 12y agoCongratulations! I look forward to seeing the ecosystem expand now that core has solidified. Very exciting.
- deleted 12y ago[deleted]
- namelezz 12y agoSix weeks after Feb 16. On their blog: http://blog.rust-lang.org/2014/12/12/1.0-Timeline.html http://blog.rust-lang.org/2014/12/12/1.0-Timeline.html
- higherpurpose 12y agoLikely around summer, which would be a good time for anyone interested in it to start coding with it.
- azdle 12y agoSo that's why I'm suddenly getting all these "warning: use of unstable item" after doing a rustup.
- steveklabnik 12y agoYes, though you will get fewer tomorrow: https://github.com/rust-lang/rust/pull/20786 https://github.com/rust-lang/rust/pull/20786
- heinrich5991 12y agoThat won't get you less warnings, it just won't turn these warnings into errors for doc tests.
- steveklabnik 12y agoOh right.
- JeremyMorgan 12y agoWell here we are. I think this is what a lot of folks were looking for, anything before Alpha just seems too bleeding edge. Will be interesting to see what the next year holds for this language.
- kibwen 12y agoCongrats to everyone involved (and there sure are a lot of you)! The TL;DR of the alpha is basically this: 1. The concept of a six-week release cycle begins today, with the first beta coming in March. 2. Breaking changes will basically cease, with the exception of a list of libraries that are still unstable and features that may be tweaked (https://github.com/rust-lang/rust/wiki/Anticipated-breaking-changes-during-1.0-alpha https://github.com/rust-lang/rust/wiki/Anticipated-breaking-...). 3. Given the aforementioned degree of remaining instability, users should still probably stick to the nightly releases in order to help keep their code up to date and weed out bugs in the compiler. As ever, it deserves to be reiterated that the 1.0 release does not represent the language being "finished" in any way, only that things will stop breaking. The language will continue evolving rapidly after 1.0, and even the 1.0 release will contain several known (and sometimes rather unfortunate) restrictions that will be backwards-compatibly lifted over time. Post-1.0, I expect there to be a large community outreach to determine which work to prioritize (for example, I foresee a great clamor for making macros more usable). With developer help I intend to publish a blog post before then detailing exactly which deficiencies Rust 1.0 will contain, and the use cases that they currently either prevent or make awkward.
- fallat 12y agoIt is now time to begin looking into Rust.
- xj9 12y agoGood timing too! I have a few projects coming up that could really benefit from the memory safety and performance features rust offers.
- Animats 12y agoFinally! I hadn't used Rust for two weeks, and when I downloaded the nightly last night, code from two weeks ago was breaking. Feature stability will help.
- eterm 12y ago
- weatherlight 12y agoThis is Super Exciting!
- namelezz 12y agoCongratulations!
- vruiz 12y ago> The core libraries are feature-complete for 1.0. Can someone well informed about Rust give some impressions on the standard library? It is as comprehensive as in python or Go for example?
- steveklabnik 12y agoCore team member here. The standard library is _not_ "batteries included," on purpose. Given that we have Cargo, and it works well, tying package updates to the language version has quite a bit of downside, and very little upside. That said, the Rust team itself maintains and provides a number of packages on Crates.io ourselves. Many of these were pulled _out_ of the standard library over the past few months.
- kibwen 12y agoThe upside to a batteries-included stdlib is, of course, that you don't have to go fishing around for the best lib to do $WHATEVER_PARTICULAR_TASK, and you also don't have to wonder whether whatever lib you eventually choose will be abandoned by its developer next month. At such a young stage of language development, I agree that it makes more sense to let the community develop libraries in order to foster competition and quality. But eventually (read: no less than a year or two from now) I think it will be up to the project maintainers to officially endorse certain third-party packages and commit to their maintenance. At a certain point, the advantages of a library that's well-known, well-maintained, and well-documented outweigh the disadvantages of de jure ossification.
- steveklabnik 12y agoIt's been my experience that the standard library is _never_ the place for the best lib to do $WHATEVER_PARTICULAR_TASK, but different folks have different preferences. We'll see how it all shakes out!
- binarycrusader 12y agoI think Python and Go are two examples where the standard library has very much proven invaluable. Without it, it's difficult to be confident in the portability of components, and it quite frankly makes the language less attractive for use. Like the other poster mentioned, I'm happy for the RUST folks to take a "wait-and-see" approach, but at some point, I believe "blessed" components are going to be expected and strongly desired.
- valarauca1 12y agoCongratulations to the rust team. I've been having fun for a while in the language can't wait to start developing serious tools now that we have a stable release :)
- Exuma 12y agoGreat job rust team! I've been playing around with this lately and it's a lot of fun.
- jumanji 12y agoAre there any plans for ARM-support? Last time I looked, it did not seem to be supported.
- steveklabnik 12y agoYou'll probably want to check out http://zinc.rs http://zinc.rs
- jnbiche 12y agoARM is well supported, and has been for quite some time. Where did you read that there was no ARM support?
- odroid-user 12y agoI attempted to install Rust on my ODROID-XU3 (which is running Lubuntu 14.04.1 LTS) just now by running: curl -s https://static.rust-lang.org/rustup.sh | sudo sh The resulting output was: rustup: CFG_CURL := /usr/bin/curl (7.35.0) rustup: CFG_TAR := /bin/tar (1.27.1) rustup: CFG_FILE := /usr/bin/file (5.14) rustup: CFG_SHA256SUM := /usr/bin/sha256sum (256sum) rustup: CFG_SHASUM := /usr/bin/shasum (5.84) rustup: rustup: processing sh args rustup: rustup: CFG_PREFIX := rustup: CFG_DATE := rustup: rustup: validating sh args rustup: rustup: error: unknown CPU type: armv7l What should I do?
- kibwen 12y agoRather than trying to run the compiler itself on a given platform, I'd recommend cross-compiling binaries from a known platform. I'm not an expert in this aspect of Rust, but here's some example Rust code that targets the PSP: https://github.com/luqmana/rust-psp-hello https://github.com/luqmana/rust-psp-hello (AIUI the magic is in the psp.json.in file, which communicates a target specification to the compiler). Feel free to come ask in #rust on irc.mozilla.org if you need some experts to consult!
- 12y ago
- svraghavan 12y agoCongrats to the whole Rust team. Awesome work. Time to jump in.
- jfaucett 12y agoI feel like this is the moment that so many devs who have observed rust over the past couple of years have been waiting for. I for one am looking forward to diving in.
- KenoFischer 12y agoCongratulations to the rust team! Committing to 1.0 is a scary step :).
- jnbiche 12y agoCongrats to the Rust team on all their hard work paying off. Looking forward to watching Rust expand into almost every corner of the development world: web, applications, systems, embedded, safety-critical, games, hard real-time, on so on!
- adultSwim 12y agoWake me when we get there
- eslaught 12y agoI've been incredibly impressed by the willingness of the Rust team to take a step back and re-evaluate old decisions. I think this 1.0 release will be much better for all the iterations put into e.g. dynamically sized types and other things that never quite fit in their first half-dozen iterations of the design. Congrats all!
- steveklabnik 12y agoThank you. Personally, I try to have strong opinions, weakly held. :)
- nickik 12y ago> strong opinions, weakly held. I like that, its mine now.
- ricardobeat 12y agohttp://bobsutton.typepad.com/my_weblog/2006/07/strong_opinions.html http://bobsutton.typepad.com/my_weblog/2006/07/strong_opinio...
- bjz_ 12y agoYeah, that was what impressed me at the beginning when I was starting. For example: ripping out classes just after they were documented and implemented, because structs/traits were enough.
- mopo2000 12y agoHow can you have an alpha without generics?
- steveklabnik 12y agoWe have them.
- Gankro 12y agoLike three different kinds, too! // Old-style generics; monomorphized // with S as an "input" type of MyTrait fn foo<S, T: MyTrait<S>>(elem: T) { ... } // Where-clause-style generics; monomorphized, // with S as an "output" (associated) type of MyTrait fn foo<S, T>(elem: T) where T: MyTrait<Thing = S> { ... } // Trait objects; dynamic dispatch fn foo(elem: Box<MyTrait>) { ... }
- kimundi 12y agoWell, the first two are really just the same thing :P
- Gankro 12y agoEh, with the new oprhan/impl rules associated and uh... not... associated(...?) types have developed quite a schism.
- dbaupp 12y agoWell, the first two confusingly change two variables at once: the things that are the same (which I presume is what kimundi meant) are fn foo<S, T: MyTrait<S>>(elem: T) { ... } fn foo<S, T>(elem: T) where T: MyTrait<S> { ... } and fn foo<S, T: MyTrait<Thing = S>>(elem: T) { ... } fn foo<S, T>(elem: T) where T: MyTrait<Thing = S> { ... }
- Twisol 12y agoI think you misunderstood something somewhere. This alpha definitely has generics. For example: enum Option<T> { Some{value: T}, None }
- gnuvince 12y agoWow. Anyone remembers Rust pre-0.1? When it had typestate, ML syntax, garbage collection, etc.? So nice to see how the language slowly evolved and was molded to fit as best as possible the problem they were trying to solve.
- bjz_ 12y agoYeah, looking through the early commits is really eye-opening.
- kibwen 12y agoIt's been a fascinating metamorphosis, undeniably. I'm going to attempt to turn it into an interesting talk for the tentative Rust conference that may be happening this year. :)
- riffraff 12y agois it really "so nice"? I wish they had been able to go forward with typestate :(
- aturon 12y agoThis is a very old post, but you can encode many uses of typestate pretty easily: http://pcwalton.github.io/blog/2012/12/26/typestate-is-dead/ http://pcwalton.github.io/blog/2012/12/26/typestate-is-dead/ It'd be great for someone to write a more up-to-date version of this post!
- Solarsail 12y agoHaven't used Rust, but I wonder what you could use in place of the phantom types? Are Traits capable of filling this role? Am I completely misreading what Traits are? Can Rust still do phantom types, and I just can't see them anywhere in the language reference?
- Jweb_Guru 12y agoRust can still do phantom types. struct Foo<T>; // `T` is a phantom type parameter.
- iamdanfox 12y agoCoincidentally, I used Rust for a little board game solver this week and have been delighted by its performance and typechecker feedback! My Scala v1 was was very concise but took ~3 seconds to simulate a whole game. The naive Rust rewrite did it in 0.7 seconds and my current version churns them out at 0.015s each!! http://github.com/iamdanfox/qwirkler http://github.com/iamdanfox/qwirkler if you're curious.. This language is really fun!
- kibwen 12y agoPerformance is an area where Rust still has a lot of low-hanging fruit to pick, so I'm happy to hear that you managed to make your version fast. Did you have to make any design compromises to that end? We're very interested in optimizing the typical use cases.
- iamdanfox 12y agoI have currently got some bit-swizzling [1] going on to fit the concept of a Piece into u8. (one of 6 colours and one of 6 shapes). I'd like to turn this back into a nice enum if I can! Introducing laziness by writing an iterator was actually one of the biggest single improvements (I couldn't figure out the syntax for a while, but lifetimes worked much better than I was expecting)! [1]: https://github.com/iamdanfox/qwirkler/blob/master/src/piece.rs https://github.com/iamdanfox/qwirkler/blob/master/src/piece....
- kibwen 12y agoHm, an enum like `enum Color { R, O, Y, G, B, I, V }` is represented by a u8 at runtime (see for yourself here: http://is.gd/YkUY0l http://is.gd/YkUY0l), which means that you're only saving a single byte in your `Piece` struct by doing that manual optimization. What was the magnitude of the speedup that you saw?
- Gankro 12y agoThere have been a few proposals for advanced bit-packing stuff, but most of it has been postponed as back-compat for later. That said, by default enum/struct layout is undefined, so it's possible the compiler could be taught to optimize your usecase correctly. For instance Option<&T> is the same size as &T because &T is strictly non-zero, and we can therefore use 0 for None.
- TylerE 12y agoThe one thing that would put rust over the top right now is something along the lines of gofmt - something simple, with zero configuration, that can be run on commit or even save.
- steveklabnik 12y agoWe absolutely want one, but we've been actually developing the conventions first. You have to know what you want to format to!
- gthank 12y agoPlease tell me those discussions are on the mailing list.
- steveklabnik 12y agoThey're actually RFCs. And the results are in a repository. I'm on mobile or I'd link you. But they generally codify already-existing style, rather than mandating it, although sometimes we just need a decision to tear down a bikeshed...
- pselbert 12y agoI was on the rust mailing list for a little while about a year ago. Around that time there was discussion of this exact subject. Most of the discussion was around exactly how to break parameters beyond a certain length and so forth, but it was there.
- deleted 12y ago[deleted]
- 2mur 12y agogofmt is a huge win for Go. Bye bye bikeshedding. I'd love to see that for Rust too.
- cpach 12y ago
- snake_case 12y agoBeing a game developer, inheritance is a really important language feature. I'm not one to abuse the power. Currently, for school I've been working on an OpenGL game engine in C++. It's a component based system. The only real inheritance situation that's important to me, is to allow the user of the engine to create any object and make it inherit from GameObject (example: Duck would inherit the members and methods from the GameObject class). Everything else is a component that plugs into GameObjects (Mesh component, Transform component, etc.) Over Christmas break, I played around with Rust and I'm really enjoying it. However, I can't figure out a nice way to inherit members from other structs. My current idea, like many others, is to keep a pointer to a "parent" object. So, Duck would have a GameObject, rather than be a GameObject. Does anyone have any recommendations for better ways I can achieve what I would like to do? I will also accept the fact that inheritance is not needed in a language, but it does make a few situations easier.
- steveklabnik 12y agoSomething that addresses your concern is coming post 1.0. Servo needs something like inheritance to model the DOM efficiently. It may or may not end up looking like inheritance, though. We determined that our possible solutions are backwards compatible, so we are doing it post 1.0, though. (Oh, and Rust doesn't get everything Servo needs, what I mean to say is "Servo has demonstrated that there is real-world need for something like inheritance, and so we will add it.")
- snake_case 12y agoThat's exactly what I wanted to hear! I heard some mumbles about inheritance coming back in one way or another, mostly on GitHub issues I believe. Can't wait to see what comes of that!
- Rusky 12y agoIf you want closer performance characteristics and simpler use patterns, in the meantime, storing the parent GameObject by value rather than through a pointer might be easier.
- Eleutheria 12y agoStupid question... Why not 'let' and 'var' instead of 'let' and 'let mut'? It's just so ... weird.
- steveklabnik 12y agoOne reason is that let takes a pattern, so you can do things like: let (x, mut y) = ... Another reason is that we feel 'mut' more cleanly communicates mutability than 'var.' Another reason is that we prefer immutability by default, and let/var doesn't communicate that as nicely as let and let mut. There are some discissions about this on the ML archives, RFC repo, or discuss, if you're interested.
- Eleutheria 12y agolet (x, var y) = ... can easily express the intention. Also, communication is in the ear of the beholder. Var: variable, that varies. 'Let' would be immutable by default. Thanks for the response anyway.
- bjz_ 12y agoWell then it would be: let var x = ... the `mut` or `var` is part of the pattern match.
- Eleutheria 12y agoNo. let x = 100 // constant var y = 200 // variable x = x + 1 // error y = y + 1 // 201
- sirclueless 12y ago'mut' conveys the same thing you are trying to convey with 'var' in a much better way. The term "variable" in programming languages doesn't carry any connotations of mutability or immutability. All it traditionally means is "named value" or "named memory address". It's actually entirely reasonable to have an "immutable variable" -- Rust uses this phrase in its error messages and it's perfectly sensible. For example, consider this snippet: pub fn is_even(x: int) -> bool { let y = (x / 2) * 2 - x; if (y == 0) { return true; } else { return false; } } Not very idiomatic, forgive me, but would you say that y "varies"? I would say yes, it varies for each invocation of is_even(). If y didn't vary, "if (y == 0)" would be a nonsense statement. y is certainly immutable -- you can't go assigning new values to it -- but it's definitely a variable. The opposite of "variable" is "a constant," not immutable. 'mut' means "mutable" and "mutable vs. immutable" is the choice here. Rust got this right, I think.
- tete 12y agoPretty nice! I mostly used Rust Nightly till now. The language, the ecosystem, etc. seems really mature now. I've been following language development for a while now. I've never seen something that is really a new language and is that far before 1.0 or in such a short time. The language developed rapidly, without sacrificing reinventing things, changing opinions a lot. I am not sure how they did that, but it's really impressive. Usually languages lack documentation, stability, performance, etc., have lots of rough edges, no users or libraries, but none of that is true for Rust. I am really curious about how this was achieved. Maybe someone involved could describe how that was possible. I am sure I'm not the only one interested in this. A year ago there was an article about using Rust for an undergraduate class on operating system development. Rust was 0.7 back then and very different and way more mature. https://news.ycombinator.com/item?id=7009414 https://news.ycombinator.com/item?id=7009414
- M2Ys4U 12y agoI'm sure that developing a large application (Servo) in parallel with the language helped quite a bit.
- nightpool 12y agoTo be fair, rustc is also a pretty huge application that they (and any self-hosted language) developed in parallel with Rust :D (I'm pretty sure I remember hearing that rustc has more code at this point then servo does, but don't quote me on that)
- larsberg 12y agoIf you just count *.rs files, rust and its in-tree libraries are around 400k lines, and Servo and its immediate dependencies are around 310k lines. Caveat: use of 'find' and 'wc' is almost invariably totally misleading :-)
- M2Ys4U 12y agoI should have probably said "non-compiler application" rather than just "application".
- cottonseed 12y agoWhat the status of Rust for Android/iOS?
- steveklabnik 12y agoEvery commit is tested against Android. We just merged a PR that improves our iOS support.
- cottonseed 12y agoThanks for clarifying. I checked the FAQ and there was a question about Windows support, but not mobile platforms. For others who are interested, there are instructions here for building Rust for Android and iOS, see "Platforms": https://github.com/rust-lang/rust/wiki/Docs https://github.com/rust-lang/rust/wiki/Docs
- vhbit 12y agoFor a long time only 32 bit archs were supported for iOS, but just yesterday a PR landed with preliminary support of 64 bit archs. As Rust uses LLVM for codegen, it means there might be a couple of minor glitches, but overall it should be stable. Considering that in February Apple will deny apps which do not support arm64 it is just in time :-) So I'd say that iOS is almost first-class citizen - the only drawback here is that it is not in build bots and therefore `master` can be broken sometimes, in this case you can check https://github.com/vhbit/rust https://github.com/vhbit/rust which may lag a bit but is always buildable for iOS.
- ChuckMcM 12y agoAwesome job! I so want to port it to the VAX so I can say "I put Rust on some old Iron" :-) Time to start exploring it again.
- mlitchard 12y agoWell, there's been some buzz about rust in the haskell community, which piqued my interest. And now it's time to give it a look.
- steveklabnik 12y agoLots of us Rust people really like Haskell too. What's the Haskell community say? Have any links I can check out?
- ibnukamy 12y agoCongrats and thank you guys for all the hard works.
- speg 12y agoStupid question, but how can a web developer relate to Rust? I had to look up 'systems programming' and Wikipedia basically told me it is writing software for certain hardware components. Will I ever be writing a web application in Rust?
- tiles 12y agoHere's a handy guide: http://arewewebyet.com/ http://arewewebyet.com/
- bpicolo 12y agoEven assuming all those things are complete, it's not necessarily the best fit for your typical consumer web application. Not unlike how you wouldn't generally turn to C++ for one.
- dom96 12y agoI'd suggest Nim (http://nim-lang.org http://nim-lang.org) as a possible alternative for this use case.
- gchp 12y agoMy background is primarily web development, however I've been writing a text editor in rust for a few months now. Prior to that, I had never written any software outside of the web. Honestly, its not such a big change once you get into it. I'd encourage you to just give it a go, build something just for fun with it. Be it a command line tool, game, whatever. My experience has shown me that just because you've only been involved in web development, by no means limits you from systems/low level development!
- MrBra 12y agoTo me it's more like s/he asked if they could build web apps with it, not about their chance to like it considering they come from web apps.
- listic 12y agoIs the Book up-to-date? http://doc.rust-lang.org/1.0.0-alpha/book/ http://doc.rust-lang.org/1.0.0-alpha/book/
- tshepang 12y agomost of the stuff; there are some notes when stuff is outdated
- arenaninja 12y agoJust downloaded, I'm excited for this
- deleted 12y ago[deleted]
- akavel 12y agoDoes anyone know of the Rust Book is available in epub format? Or, if not, but if it's still possible to build one from source, what are the required dependencies I have to install to be able to build the epub?
- gascloud 12y agoIt would be more useful in a format which works on Kindle, since that's by far the most common. It wouldn't hurt to support both and also pdf. If there was a single page view of the book it would be quite trivial to export it to a single ebook file.
- kasabali 12y agoOpen source tooling for creating mobi's are nowhere near epub's and Calibre does a good job of converting epub to mobi, so I don't mind when projects offer only epub, although I'm a heavy mobi user.
- swetland 12y agoIs there a way to parallelize the build? I just checked out the github repo on a quad core 3.4GHz i7 with 16GB ram, and make -j8 took 37 minutes -- the c/cpp stuff (like llvm) built in parallel, but all the rust stuff did not, such that 7 cores (HT) of 8 were idle for the bulk of the build.
- alouanchi 12y agoFinally time comes to have a look at it.
- builtwithrust 12y agoHi everyone, Have you guys already had any cool projects and want to share with us? I just quickly made a site here where I would love to showcase your Rust project. http://builtwithrust.com/ http://builtwithrust.com/. Thanks all,
- builtwithrust 12y agoHi everyone, Have you guys already had any cool projects and want to share with us? I just quickly made a site here where I would love to showcase your Rust project. http://builtwithrust.com/ http://builtwithrust.com/. Thanks all,
- MrBra 12y agoQuick poll: what's your favourite features in Rust? What's the core reasons for you are going to use it soon?