11 ms·
Apple is starting to use Rust for low-level programming
- mplanchard 6y agoThis is so exciting. They just opened the 2020 State of Rust Survey[1], and I would imagine that I’m not the only one who noted that I hoped more companies would start writing software in Rust, so that hopefully I can use it as a primary language at my next job. Apple using Rust for new low-level functionality definitely is a step in the right direction! [1]: https://blog.rust-lang.org/2020/09/10/survey-launch.html https://blog.rust-lang.org/2020/09/10/survey-launch.html
- captainredbeard 6y ago> Apple using Rust for all new low-level functionality definitely is a step in the right direction! Nowhere in the job posting did it indicate or intimate that. It looks like one team doing network infrastructure (for backend services, not Apple platforms) is writing Rust code.
- mplanchard 6y agoAh, I see. I was just basing my comment on the tweet. Edited to make it a bit less strong
- colmvp 6y agoIt's interesting because I spent time learning C++/Rust a year or so back and I stupidly didn't look into the job market before devoting time to it only to get the sober realization in my city of 6 million that very few companies were looking for it. I ended up learning Javascript not because I truly loved it but because there are/were significantly more positions available.
- Jtsummers 6y agoIt's only a stupid decision if you learned nothing. The things you learn writing code in one language are often transferable to others (just avoid being the type who can "write Fortran in any language"). Rust and C++ have different OO models than each other and Javascript. Rust has a different type system than C++ and both have different type systems than Javascript. Take the things you've seen/learned from the first two languages and you'll be able to see things about JS that those who've only learned it won't see, or you'll see patterns that you can apply to your JS code that are non-obvious without extra-JS experience. Additionally, having experience with static type systems, the statically typed languages that are transpiled to JS shouldn't be as big a learning curve for you.
- setpatchaddress 6y agoThe use cases for C++/Rust and JavaScript are generally very, very different. One might have better luck concentrating on learning a technology stack as opposed to a language.
- bsder 6y agoRust, yeah, that's not really going to net you a job. However, for a city of 6 million I'd expect a couple hundred C++ jobs.
- colmvp 6y agoThat's what I expected too but honestly when I was looking I found maybe... 5 positions? And none of them were entry level.
- notacoward 6y agoOne project/team out of how many? Any of the FAANG companies will already have code in dozens of languages. Rust has probably been in the mix for years, as has Go, as has Erlang, as has Haskell, and so on. It's great that there are job postings for this, but not sure if it's really news.
- melling 6y agoCompanies don’t let you use production code in any language you choose. There is usually a discussion. I was in a Perl shop many years ago and introducing Python was strongly discouraged.
- notacoward 6y ago> Companies don’t let you use production code in any language you choose. You might be surprised. At most companies I've worked at (over a dozen) that's largely true. Three jobs ago I was product architect for the entire company and spent a significant part of my time fighting just this kind of language proliferation. However, it's a very different story at a large company. Google seems to try pretty hard to keep this under control. OTOH, Facebook (where I work) prides itself on a "bottom up" "engineer driven" culture in which any such top-down prescriptivism doesn't fly. Don't know where the others fit in along that spectrum. The situation gets even murkier when code is inherited via acquisition or imported from open source. So such code often exists, whether it's "supposed to" or not.
- pjmlp 6y agoI had a couple of consulting projects which were basically porting non-official-language into one of the official internal stacks.
- nindalf 6y agoInteresting that you mention Facebook. A team at Facebook can choose whatever language they want, but they're on the hook for creating and maintaining libraries that talk to internal services (config, database etc). There's a tendency to choose one of the existing popular languages (C++, Python, Java) so you get those libraries for free. Therefore in practice, giving engineers the freedom to make their choices doesn't lead to an explosion in the number of languages used in production. An engineering team that can get started with a new, esoteric language without having to first build internal libraries is much more likely to try that new language.
- orev 6y agoThat tweet really blowing things out of proportion. Migrating one project, out of presumably many thousands, is not “going all in”. It’s still interesting though.
- gilrain 6y ago> ...and building new functionality primarily in Rust.
- steveklabnik 6y agoIn no way does that imply that the whole company is doing so, just that one team.
- Thaxll 6y agoYup, there is probably more Perl project at Apple than Rust ones.
- jagtesh 6y agoMost large companies typically have a bunch of primary languages/frameworks, so IMO there's never really such a thing as going all in. Unless you're FB and you're stuck with PHP/Hack.
- judge2020 6y agoFrom the job posting[0]: > We interface directly to low-level Linux kernel interfaces, using asynchronous I/O and threads to distribute workload. Following a very successful first foray into Rust we are migrating an established codebase from C to Rust, and building new functionality primarily in Rust. However, the team specifically works on the cloud services: > We develop and deploy software which forms the foundation for some of Apple's most important services, including iCloud, Maps, iTunes, and more. So no rust-based software is going into MacOS or iOS quite yet. 0: https://jobs.apple.com/en-us/details/200170723/software-engineer-networking-privacy?team=SFTWR https://jobs.apple.com/en-us/details/200170723/software-engi...
- ksec 6y agoSo I am reading this as more like Apple is funding ( so to speak ) some work on Linux Networking using Rust? Which seems reasonable given Linux Kernel recently shared their intention to accept Rust code. And I was thinking why did they make Swift for low level usage if they were going to use Rust.
- bee_rider 6y agoSwift is 6 years old, Rust might have been popular among programming language connoisseurs at the time, but it wouldn't have been that silly to expect it to be a fad.
- swsieber 6y agoRust hadn't hit 1.0 6 years ago and it changed a lot leading up to 1.0
- tachyonbeam 6y agoAnother factor here is that Chris Lattner, creator of Swift, used to work for Apple, with a high-ranking job, he was directing a whole department. He's since left Apple a few years ago. No longer having the creator of Swift championing its use at Apple opens the door to alternatives. I haven't used Rust myself, but it looks like a solid language for systems development.
- linuxlizard 6y agoI wish Rust's non-x86 support was a bit better. I wish I had time to jump in and help on the MIPs target. I wish I could figure out how to cross-compile to ARM/ARM64+uClibC. I wish I had a pony, too. Very exciting to see a language tuned toward reliability taking off like this.
- steveklabnik 6y agoARM themselves are sponsoring work on the aarch64 Linux target. https://github.com/rust-lang/rfcs/pull/2959 https://github.com/rust-lang/rfcs/pull/2959 I work in arm32 daily, it works well for us. Happy to help if you need some!
- davidhyde 6y agoDo you mean Tier 1 support? There are just so many rust arm targets that it is difficult to make guarantees. Here is the official list if anyone is interested: https://doc.rust-lang.org/nightly/rustc/platform-support.html https://doc.rust-lang.org/nightly/rustc/platform-support.htm...
- fastball 6y agoWell, luckily with Apple hopping on board I'm sure they'll put the effort in to ensure they can compile to ARM targets. A Rust + Swift, massively cross-compiled future sounds pretty nice actually.
- mmastrac 6y agoI have an example of cross-compiling Rust to multi-arch docker images here via GH releases + cross, if it's helpful: https://github.com/mmastrac/stylus/blob/master/.github/workflows/release.yaml https://github.com/mmastrac/stylus/blob/master/.github/workf... https://github.com/mmastrac/stylus/blob/master/build.sh https://github.com/mmastrac/stylus/blob/master/build.sh
- zip1234 6y agoLimited experience here but seems like fairly large binaries for embedded as well. Though have not spent much time investigating how to make them smaller.
- checker659 6y agoDidn't Apple use Java at one time for iCloud / mobileme backend?
- pjmlp 6y agoThey still do, WebObjects.
- masklinn 6y agoWO was last updated 12 yeas ago, removed from the default OSX Server 11 years ago and officially discontinued 4 years ago. Saying that they're still using it might be a bit optimistic.
- pjmlp 6y agoJust because the outside world doesn't get it, doesn't mean they haven't kept it running inside.
- shadowfacts 6y agoIf you poke around App Store Connect, you don't have to go far to find WebObjects actively being used.
- captainredbeard 6y agoThey are still using WebObjects-derived stacks.
- masklinn 6y agoApple used to use Java throughout their corporate properties, for all backend and frontend, e.g. https://en.wikipedia.org/wiki/WebObjects https://en.wikipedia.org/wiki/WebObjects
- r053bud 6y agoWhat happened to "Swift for everything"
- buzzerbetrayed 6y agoWait did you really think they were going to start writing OSes in Swift?
- mrfusion 6y agoCould rust be used for low level os modules or for drivers? Why or why not?
- steveklabnik 6y agoYes. In fact, the Linux kernel has been talking about allowing drivers to be written in Rust. (There are other examples of stuff in this space too, but that's the biggest deal so far.)
- zokula 6y agoDon't get ones hopes up about rust module code shipping with the kernel for at least a decade, or until you can build rust code with GCC.
- steveklabnik 6y agoThe kernel devs have said that that is not a blocker. (This is because what's being discussed are drivers, not the kernel itself, though they would be in the kernel tree.) And, there's been some interest towards getting gcc to be able to compile Rust too, so that may happen regardless of its need or not.
- thrwn_frthr_awy 6y agoAn an ex-Apple engineer I can assure almost every programming language you can think of is probably used by one team or another. The idea that a team rewrote a service in Rust means Apple is "all-in" in Rust is ridiculous. Every large company I've worked at has had many, many internal services using all sorts of different languages/frameworks.
- geodel 6y agoAgree. I think this is typical 'small guy landing big punch attitude'. I see this is common for languages which have not yet achieved (real or perceived) popularity.
- lmilcin 6y agoNot every company, but some companies, Apple included, like to experiment for the simple reasons that some of the experiments pan out and it pays for ones that don't. This makes more sense for tech companies. I work mostly for large banks and there definitely is less experimentation but there still is more experimentation than one would think (I have couple large Clojure projects very close in my org).
- thrwn_frthr_awy 6y agoIt's not because of experimentation–it's because Apple for the most part lets their team's choose what they feel is best for what they are trying to accomplish. It is trust. If there was a concern about a technology choice, it was discussed and pros/cons weighed, but there wasn't some standardization of language under the guise of "developer productivity".
- lmilcin 6y agoThat is experimentation. This is organization say it lets people to make mistakes because of potential payoff. If the organization did not believe in potential of value from these ventures there would just be a small limited amount of languages to choose from because it is more economical when you consider support system. This is starkly visible in banks where there is huge need for development support system but no belief in value from ventures into obscure languages. The end result being that everything is written in Java and maybe couple other JVM languages (just because it is easy when you are already invested in JVM).
- ausjke 6y agohttps://www.youtube.com/watch?v=iOBXVOAbpdY https://www.youtube.com/watch?v=iOBXVOAbpdY 8-min video says rust is not that safer comparing to C in practice
- tblacky 6y agoRust is a very clean and powerful language with several use cases. It's super easy to be productive in Rust and I'll predict Rust is going to dominate.
- tblacky 6y agoRust is a very clean language with several use cases. It gives a lot of power to the programmer and it's super easier to be productive compared. Rust will win over Go much like React.js won over Angular. I'd predict that the Rust language will dominate and become a must-know in a couple years time.
- zokula 6y agoThe Rust Evangelism Strikeforce is out in full force.
- higerordermap 6y agoRust is the new systems language with a good safety story (which implies some cognitive overhead, but that's fine for low level programming where you don't want a GC), gives C++-like performance by virtue of being close-to-the metal, and a zealot crowd around it with many kinds of political bullshit and ruby / Javascript hipsters learning it and thinking they have understood computer science because they understood difference between stack and heap. Rust is a fringe language and it won't get a lot of traction, because of more-noise-than-signal more-politics-than-technical-talent surrounding it.
- SomeoneFromCA 6y agoNothing has pushed out C, not even C++. C was with us 40 years ago, will be with us in 2060 too.
- Ihfhcub 6y agoPeople's negative reaction to this comment believe is that new languages can only solve so many problems. Doesn't matter how great Rust is. So the idea of pushing a new languages too much gets bad reactions.