7 ms·
Comprehensive Rust: course used by the Android team at Google
- RcouF1uZ4gsC 3y agoRust is the first systems programming language since C++ I have seen pushed by multiple large tech companies. Go was pushed primarily by Google Swift was pushed primarily by Apple C# was pushed primarily by Microsoft I am seeing a push for Rust by Microsoft, Google, and Amazon. In retrospect, it almost seems that Mozilla closing the Rust team was a good thing for Rust as a lot of the Rust developers ended up at other companies and Rust became more than just a Mozilla language.
- loeg 3y agoI believe Rust evangelism spread to other companies long before Mozilla stopped incubating the language.
- steveklabnik 3y agoThat is correct. These other companies were already employing people who worked on Rust in some capacity when all that happened.
- whatyesaid 3y agoRust is actually more suited to those companies than the general public (small companies and individual programmers) so it makes sense they do push it hard.
- _rs 3y agoWhy would you say that is, or why do you think so? I would argue Rust is definitely suited towards small companies and individuals for a lot of projects that C/C++ would’ve been used for before, even things like small audio units or plugins
- howinteresting 3y agoRust has many design features that make it work well for larger teams.
- culi 3y agoWell that's not saying much. So does TypeScript. Those features that make it suitable for larger teams also make it a solid choice for smaller teams. It's hard to imagine a feature that benefits a large team much more than would benefit a smaller team but I'm open to an argument
- howinteresting 3y agoThe benefits of making illegal states unrepresentable, providing safe abstractions over unsafe boundaries, and high-quality built-in documentation scale quite nonlinearly to large teams is all.
- Turskarama 3y agoWhile true, the majority of development doesn't happen in systems languages but generally in garbage collected languages.
- whatyesaid 3y agoJonathan Blow puts it as the "cost of experimentation being too high" which I would agree with. Generally, as an individual or small group the limiting factor for you at times becomes time. Sort of the philosophy where you design by programming instead of whiteboard or clearcut stuff. Less flexible design but more automatic correctness is worth it for big companies because projects involve millions of lines of code and thousands of people over the lifecycle. It's sort of like writing microservices when you're an one man shop. The correct philosophy is monolith first - until you're doing something useful, don't obsess that much. If you've got a clear vision of each project, or perhaps it's a larger scale project more similar to those in big tech, then perhaps Rust is best. But those kinds of projects typically don't even need C++/Rust. I use C++ for high performance experimental software. I would like a C++ replacement also though, maybe through a design like Carbon where it's built above it. You could also then do stuff like making the borrow checker optional and with parts of the program instead, as a sort of finalization refactor. Combining the best of both worlds.
- bfrog 3y agoArguably Rust is great for small/single owner companies as well. It saves vast amounts of time in comparison to c/c++
- junon 3y agoAs someone who once despised working with Rust pre-v1, I firmly believe Rust is the future.
- seabrookmx 3y agoHonestly all three languages are great in their own ways, but you're right in saying none of them really hit that low level "systems" niche. I'm a big C# fan but I see very few use cases where I'd consider both.
- mohaine 3y agoThe main reason is that Rust is the first new systems language in a long time. That no big players owned it helped as well. Go and C# are not systems languages. Maybe a stretch goal at best.
- beeburrt 3y agoThis seems like an awesome resource, but for a self learner like myself, not so much. It's assumed that this book is accompanied by an experienced rust dev for a lecturer. The posted link is to the GitHub repo, here's the link to the book: https://google.github.io/comprehensive-rust/ https://google.github.io/comprehensive-rust/
- asicsp 3y agoDiscussion: https://news.ycombinator.com/item?id=34091271 https://news.ycombinator.com/item?id=34091271 (568 points | 5 months ago | 198 comments)
- mrtngslr 3y agoHey there! I wrote the course and you're spot on: the course is meant for classroom training (at Google and elsewhere). If you have the time to read a book, then I highly recommend diving into one of the many great Rust books. I've linked some of the freely available ones here: https://google.github.io/comprehensive-rust/other-resources.html https://google.github.io/comprehensive-rust/other-resources..... We've made an attempt at making Comprehensive Rust useful for self-learners by providing speaker notes on many of the pages. However, they're still quite terse and could be expanded in many places. PRs for that will be gratefully accepted :-)
- yobbo 3y agoFor newcomers, https://github.com/rust-lang/rustlings https://github.com/rust-lang/rustlings is a good way to start.
- mmastrac 3y agoI'm very happy I dug into rust half a decade ago. The language has been fun to learn as it evolved futures and async/await, and the future continues to look promising. I've had the pleasure of working professionally in Rust twice in my life (once at Full story, now at Deno) and I can say it's by far my favourite language to work in. I did some Rust training with Ferrous but by far the most useful way to learn was just picking up a project and building it.
- brabel 3y agoI envy people who can pick up Rust and just get stuff done. I've tried many times but every time, I find it far more difficult to build things than any other language I know, so I just give up and go back to "easier" languages.
- yboris 3y agoI suspect this is about experience. I had experience with PHP, JavaScript, and Python, but when at first coding in Go it would take me as much as 10x as long. But with more practice it's now only about 2x as long as in other languages. Keep practicing ;)
- brabel 3y agoI think my experience is actually the problem. I don't have enough patience anymore to spend lots of time trying to understand errors where I have zero idea why it's complaining, when I know the same thing in another language works totally fine the first time I try (and without bugs, it's mostly lifetime issues or the lovely borrow checker, which don't even exist in other languages). But I do keep trying Rust, because the alternatives as I see it, C and Zig, have their own problems that are bigger (C's build tools and lack of package management, very weak type checking and unavoidable UB, and Zig's overall lack of maturity and consequently tooling). By the way, I can write code very easily in Java/Kotlin/Groovy/Dart/JS/TS/Go/Lisp.
- db48x 3y ago
- rickstanley 3y agoFrom https://google.github.io/comprehensive-rust/ https://google.github.io/comprehensive-rust/: > This site uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic. [Learn more] [Ok, Got it!] No reject? :|
- pumanoir 3y agoI've seen the same in many google pages (which I think is illegal under GDPR).Anyways, I use ublock origin to get rid of that.
- renewiltord 3y agoCool thing. I currently use ChatGPT to provide me some exercises as I get better at the language. This is more like a presentation that needs accompanying conversation from the presenter.
- beeburrt 3y ago> I currently use ChatGPT to provide me some exercises as I get better at the language. That's a good idea, thanks! I'm gonna do that too
- adolph 3y agoIt is interesting that they have a day devoted to embedded using MicroBit v2. The older Rust-Embedded Discovery book [0] also used Microbit but the later edition [1] suggests a STM32F3DISCOVERY. For RISC-V and Extensa fans there is also Ferrous Systems' Embedded Rust on Espressif training material [2] which has a coordinated board [3] that has been "cloned" by Wokwi [4]. 0. https://docs.rust-embedded.org/discovery/microbit/index.html https://docs.rust-embedded.org/discovery/microbit/index.html 1. https://docs.rust-embedded.org/book/index.html https://docs.rust-embedded.org/book/index.html 2. https://esp-rs.github.io/espressif-trainings/ https://esp-rs.github.io/espressif-trainings/ 3. https://www.amazon.com/dp/B0B4FPV9FW https://www.amazon.com/dp/B0B4FPV9FW 4. https://wokwi.com/projects/new/rust-esp32-rust-board https://wokwi.com/projects/new/rust-esp32-rust-board
- zokier 3y agoFor embedded Rust the biggest thing imho is that Infineon, a major microcontroller company, is officially supporting Rust https://www.infineon.com/cms/en/product/promopages/rust/ https://www.infineon.com/cms/en/product/promopages/rust/
- steveklabnik 3y agoDon’t forget Espressif too.
- mrtngslr 3y agoMy colleguage Andrew wrote the bare-metal part. I believe he picked the micro:bit board because it's readily available around the world. It also has a lot of fun sensors (microphone, rudimentary speaker, compass, ...). I'm sure there are other boards around, but so far people seem very happy with this board in our classroom training. The only slight problem is the noise when 30 boards are powered on at once :-D They ship with an elaborate demo program which plays sounds and blinks the LEDs when you start it up.
- adolph 3y agoThat makes sense. The first was great fun and v2 looks even better. I had written them off due to chip shortages but it looks like availablity is better now.
- tripdout 3y agoThe dive into using it in AOSP is very cool
- curiousgal 3y ago> Android team at Google I am partly joking but judging by the state of the last couple of Android versions, that doesn't sound as good as it used to be.