15 ms·
The Adoption of Rust in Business
- TrackerFF 4y agoThe organization (gov.) I work for recently took over a product where the entire back-end was written in Rust. Basically the product was developed by a bunch of Rust enthusiasts in a R&D group, and the product was wholly financed by gov. grants. When that money dried out, they were faced with either just shutting it down, or trying to sell or give the product away. Some higher-ups decided this could be a great internal tool, and got it for free. The product works great, but the codebase is around 400k LOC of Rust, and we don't have any budget to hire Rust developers. And when we had a budget in November, it was really hard to find anyone local (work requires a high security clearance, and remote is not possible for this kind of work due to said security issues). So we're kind of stuck with just keeping it around until better times, or just re-writing the entire back-end in something we know better. Not to sound like a downer, just an example of what Rust adaption could look like from the other side.
- tdudzik 4y agoWhy not just train developers you have instead of hiring new ones?
- yazaddaruvala 4y agoI feel like it took me 2 weekends to "learn Rust" enough to make feature changes, and another 2 weekends to really "get it" enough to build basic abstractions. I feel like it would take another week or two to learn some of the UnsafeCell/Pin/Generators type stuff, but none of that is needed for 95%+ of Rust code. I think if you and your team just started learning Rust week by week, you'd find in 3 weeks that you're equally productive in Rust than your current languages. Especially given the code base already exists. Even just starting to learn Rust by writing tests (if there aren't) would be sufficient to improve that system rather than wait to hire or re-write it.
- ekleraki 4y agoI’d add that this is a great opportunity for OP to treat it as akin to “rustlings” or a possible analogue, where they break different functions that they know work, and building it up again s.t. the tests pass fine.
- bin_bash 4y agoAs a counterpoint, I’m a senior engineer at FAANG with 15 professional YOE. I’ve mostly used scripting languages in my career though. It took me probably more like 1-2 months to really understand how to code in Rust. I do not think a typical team of JS/Python devs would be productive in 3 weeks. I think it would be more like 3 months. Developers with C++ experience seem to pick it up much quicker. Also, at this point I’m pretty proficient in rust but I’m still far slower than I would be in a scripting language. So I don’t think anyone would ever reach “equally productive” unless they’re comparing themselves to another compiled language. I like Rust, but it’s challenging, and it’s certainly not a language for rapid development.
- LoganDark 4y ago> It took me probably more like 1-2 months to really understand how to code in Rust. I do not think a typical team of JS/Python devs would be productive in 3 weeks. I think it would be more like 3 months. Our very first Rust project (to learn the language) was a path tracer that was done (fully functional) in 2 weeks. I doubt it would take a team 3 months to become productive in Rust. There's always more to learn, but "being productive" is quite a low bar if they already know basic programming concepts. With that said, "typical JS/Python devs" might not even know said basic programming concepts, so maybe you're talking about those? Regardless, 3 months is an extremely conservative estimate. -Emily
- wongarsu 4y agoYeah, while there is a decent market of remote Rust developers, hiring locally can be very challenging. Maybe training a C/C++ developer in Rust is an option for you? Of course it's not a language you get fluent in in a single weekend, but Rust also isn't extraordinarily complex.
- carlmr 4y agoAs a C++ dev that is very Rust enthusiastic. Rust is quite easy to learn if you have a decent grasp of C++. The biggest thing you need to unlearn is the paranoia.
- pclmulqdq 4y agoAnd that most things you used to do with pointers (linked lists, graphs, etc.) need to be done with something else.
- pkolaczk 4y agoTypically those things would be enclosed in libraries providing safe and convenient APIs. Sometimes you might need to use a bit of Rc<RefCell> here and there. At worst, you are not any worse than in C++: use unsafe.
- pclmulqdq 4y agoIf I had $1 for every time someone told me that Rust had a "safe and convenient" API to do something that I wanted to do which didn't actually do the thing correctly or conveniently, I would have a lot of money. This line really needs to be dropped from the Rust sales pitch. If I did it myself in another language which also has a ton of libraries (eg C++, Java, Go, etc.), there is no reason why I would want to reach for a library for that piece of code in Rust. There's usually a good reason why I didn't use a library.
- adgjlsfhk1 4y ago
- xwolfi 4y agoYup it's why the language shouldn't be too integrist with its theories or too particular with its syntax, because when time comes to find an intern to survive a few month and they're all swimming in Java and Javascript, you're fucked and you cant even beg a C/C++ oldie to come out of retirement. Rust might be okay but even Python I would hesitate. I and my team all converted quickly to being efficient java+js+C# devs coming from either of each and I cant imagine working in a company when not only the business and the tools are particular, but the frigging language as well. It's overloading for new comers. And imagine in 20 years, which is the age of the software I maintain: you d rather fight a Java or C# spaggheti or a Rust spaggheti ? It will be a spaggheti, you can't escape it and last 20 years being profitable.
- LoganDark 4y ago> Rust might be okay but even Python I would hesitate These languages are not even on the same spectrum. -Emily
- nevi-me 4y agoThat sounds like a good opportunity to learn the language. I've had to learn things under duress in my career, often rhat 'low-code' platform whose app is now broken or needs some change, that COBOL system being migrated, whose rules were written before I was born, etc. Most of what I learn ends up being throw-away, done out of necessity. However, I feel like something written in a popular and growing language like Rust, with an opportunity to learn, maintain, change and improve, would be a net positive. I'm biased because I learnt Rust in ~2018 and have enjoyed it, however if this were say Scala or Go before I learnt them, I'd feel the same way. Yesterday I was in a jam session with a colleague, we prototyped something quick and dirty, got it to work, and then refactored it into something neat and clean. This was such a pleasure, because I feel like the language empowers me to make large refactors mostly without introducing breakages (at least when you're shuffling code and types around).
- matwood 4y ago> I've had to learn things under duress in my career This is how I've learned most things in my career :D For something like Rust (or other languages like go or objc) though, I could see how it would be hard for someone whose only background is in js or python. There are concepts completely missing or hidden from the programmer that they now have to deal with.
- nevi-me 4y agoThe simpler parts of Rust feel like TypeScript, let's say as long as you're doing simple things as a start and don't worry about threading. Rust was probably also a lot easier to learn pre-async-await, because one would have to explicitly opt in to multithreading through std::thread. My first productive language was JavaScript via NodeJS (I learned PHP first, but it was a mess). I did so much with it that by the time I learnt other languages on my own, it was out of necessity. From a language syntax and concept angle, I'd say Java + Scala were difficult to grok at first. Java for the boilerplate, Scala because I could never understand what the underscore is for. Kotlin became a breeze and pleasure, then Rust after that. I learnt each language by converting my projects from a previous language to a new one. So that helped me limit the concepts I'd introduce. Mostly do some calcs, interact with a DB and expose stuff via gRPC. By the time I started with futures, channels and threads, I had gotten far enough programming against a single core. I often advise people starting out to be gentle with themselves and stick to what they know first. Like other complex languages, one might remain a learner for very long.
- jackmott 4y ago[dead]
- IshKebab 4y agoJust hire C++ developers who want to learn Rust. There are tons of Rust developers desperate for non-crypto Rust jobs.
- blub 4y agoIf you look at the Rust community, it’s split between those that consider Rust appropriate for systems level programming and those that want to use Rust for everything. The back-end Rust comes from the latter part of the community and my impression is that it’s fighting an uphill battle, because the language is not a good match for such software when compared to Java or even Go or Python. 400.000 lines also sounds huge for a web project. Contrary to other commenters I don’t advise learning Rust just for this project. In general maybe it’s worth it, but web Rust is new, has an uncertain future and likely no job market value. If it was a research project there’s no telling what horrors lie in that code base :-)
- kouteiheika 4y ago> The back-end Rust comes from the latter part of the community and my impression is that it’s fighting an uphill battle, because the language is not a good match for such software when compared to Java or even Go or Python. > > 400.000 lines also sounds huge for a web project. I maintain a 180k+ line of code back-end web project and I use Rust. Best decision I've ever made. I serve over half a millions of HTTPS requests per day. Everything hits the backend, no CDNs or caches of any kind. Average CPU usage on a cheap VPS? ~3%. Hugs of death? No such thing for me. It just runs itself without any supervision for months uninterrupted, so I can sleep at night and not get woken up by an outage. And refactoring is a breeze due to a strong type system, plus all other niceties that Rust has. So for a complex project that you're going to maintain long-term? Rust is absolutely the right choice, even for backend web-dev. A throwaway CRUD e-commerce website made by a random webdev consulting company on the cheap? Okay, yeah, maybe here you're right, and I probably wouldn't pick Rust there either.
- pipe_connector 4y ago500,000 requests/day is ~6 requests per second.
- goodpoint 4y agoYou could handle that with Ruby on a raspberry 1
- schneems 4y agoIt’s a huge learning curve but it’s worth it. I came to Rust from Ruby and after a few years of practice now I’m at a spot where I would generally prefer using Rust over Ruby. I recommend rustlings for interactive tutorials to do alongside the rust programming language book. I also just heard a rustacean station episode featuring a pakt author who wrote “ Rust Web Programming” it sounded good.
- exDM69 4y ago> Basically the product was developed by a bunch of Rust enthusiasts in a R&D group This is not a great starting point for any project, never mind the programming language. It could've been C++ enthusiasts, or Haskell, Scala, Lisp or any other language that appeals to enthusiastic programmers. I've recently been involved in two projects with the same problem - initially developed by a small team of enthusiast level programmers in language X (not Rust). Other people in the team (competent programmers) have trouble being productive as the enthusiasts had gone to the deep end with language features which were not strictly necessary to complete the task at hand.
- zozbot234 4y agoHow does "a small team" end up writing 400k LOC? My guess is that the count may be inaccurate - it probably includes a whole bunch of vendored code that got added to the project because of the high-security environment. Rust and Cargo make it challenging to develop a project in a fully "secure" fashion, C/C++ has a better story there.
- exDM69 4y ago> Rust and Cargo make it challenging to develop a project in a fully "secure" fashion, C/C++ has a better story there. Complete absence of dependency management and a myriad of incompatible build tools is a "better story"? You can have this "story" in Rust by just disabling crates.io centralized registry. Which still leaves you in a better position than C++ because you can use the build tool and dependency management locally and do whatever you're used to doing in C++ land (put 3rd party code in your repo, install them via some other packaging tool etc). Or if you insist on going the whole way, you can invoke rustc via your favorite flavor of make. On a more realistic note, if you're working with in a very safety/security conscious environment, and still depend on 3rd party code: you could set up your local package registry and have people vet the 3rd party dependencies. Yes, it costs time and money but at least you get the tools to do it from the language ecosystem. I've been professionally involved with the C/C++ way of doing things for decades and I find the Rust build and dependency management tooling a huge improvement.
- rcarr 4y agoThere seems to me like there is a clear third option here which is for the organisation to buy an online rust course or select some of the (many) free materials online and pay a few existing employees (or new employees with previous programming experience but no rust experience) to do nothing but study those resources for two months before making them the senior devs/tech leads of the codebase. What is it with organisations refusing to pay to train and upskill employees nowadays? It is such short minded thinking to not invest in your own people.
- huijzer 4y agoHow would you like it to hear that you’ll be a Rust programmer tomorrow if you have been a happy X programmer working on system Y for, say, 10 years?
- karmakurtisaani 4y agoSign me up!
- rcarr 4y agoTbh mate I think this is a bit of a daft contrarian take. Clearly you would offer it to existing employees to see if anyone was interested then, if not, hire new employees like I said in the comment. If you've still failed to find an employee (who is going to get paid to do nothing but learn a brand new language and then be senior dev/tech lead for it which would be a pretty sweet gig for a lot of people) you would then do the heavy handed approach of forcing an employee to learn it. At the end of the day you can't have a critical piece of organisation infrastructure completely unmaintained and if you have to, then you'll have to strong arm someone in to it, but you should always aim to do that as the complete last resort. And if you are going to do it, you can probably sweeten the deal with a pay rise or other perks. But I seriously don't think you'd have to because if you were a junior/intermediate dev and someone offered you an opportunity like this to both learn a new language whilst getting paid and rise a rank in position and compensation you'd be mad not to take it.
- ekidd 4y agoHonestly? I do the job that's in front of me. That has included everything from pre-STL C++, to 90s-era PHP and even Visual Basic for Applications. And a few things even more obscure than that. I do sympathize with agency's situation—I have actually put Rust into production and been responsible for mentoring programmers to work on it. I like Rust! But I almost certainly wouldn't have chosen Rust for a government production system without making sure that all the stakeholders understood the tradeoffs. Although, it sounds like this was an abandoned R&D prototype that was voluntarily picked up by another team, so I don't necessarily blame anyone involved here.
- solidsnack9000 4y agoHow can I learn more about the project and your situation? I use Rust at work and enjoy working with it; I've also done some work for .gov in the past and like to see technology projects in the public sector be successful.
- pc86 4y ago> The product works great, but the codebase is around 400k LOC of Rust, and we don't have any budget to hire Rust developers. So learn Rust? You've already said the product works great so it doesn't seem like a reasonable rewrite candidate. The vast majority of software doesn't need to be super cutting edge, doesn't do anything particularly difficult, and isn't written by geniuses. Honestly, any developer worth being hired should also be good enough to pick up another language during the work day over the course of a few months. Rust in particular has a bit of a learning curve, I'll give you that (so I've heard, I don't know it well enough to write production code in it). But "it's hard" doesn't seem like a particularly good reason to throw out a perfectly good 400k line codebase.
- dgs_sgd 4y agoWould a full rewrite in a language the devs know better actually be faster than using that time to ramp up on rust?
- MuffinFlavored 4y ago> The product works great, but the codebase is around 400k LOC of Rust At a high level, what does the codebase do that it took 400k LOC? CRUD REST endpoints? /s How long did it take how many engineers to end up with 400k LOC codebase?
- mderazon 4y agoFrom the individual developer point of view, learning something new while getting paid for it is the best thing. So if your organization is up for it, I would take that chance without a doubt. From the organization POV, yeah that sucks
- gemstones 4y agoAre you guys C or C++ programmers? (I'm not.) Here's why I ask. I started with Ruby. Since then, I've branched out to a bunch more, including Rust. Most are fairly easy to pick up. There is, however, a class of languages I'm totally scared to try and pick up. They're C, C++, and PHP. It's not because they're bad languages, or I couldn't learn them - it's just that all those languages have a reputation for making security holes easy by default. There will be a learning curve where I'm an actively dangerous programmer to be around. I'm gonna just stay away. If I started with C++, and not Ruby - my perspective would be quite different. I would assume there are dangerous footguns lurking in every other language as well. Learning any language would be a scary thing. I would try to learn Rust. Its compiler won't prevent every bug or hole, but it's hard to screw things up as you're learning. There's really only one rule, to avoid using unsafe unless you really can be intentional about what you're doing. If it's uncertainty that keeps you from learning - most languages are far more forgiving than what you're used to. And if not, none of these points apply, I guess.
- goodpoint 4y ago> the codebase is around 400k LOC of Rust, and we don't have any budget to hire Rust developers That's what you get with hype-driven development.
- rowanG077 4y agoIf you have 400k LOC why are you even considering rewriting it? It would take way less time to learn Rust then to rewrite something like that.
- cpeterso 4y agoSounds like the project didn’t have a continuity plan for how it would continue to be developed or maintained after the grants ended, regardless of the implementation language. Rust is a hot language and there have been many big tech layoffs. Maybe some Rust or C++ developers would now be interested, even at a market discount, to use or learn Rust professionally?
- andrewstuart 4y ago“voted the most popular programming language for the seventh consecutive year, with 87% of developers expressing a desire to use it.” And yet where I live, it has extremely minimal adoption. There’s more rust jobs at panel beaters than doing software development. Rust has to fix itself or remain popular but essentially unused.
- Ygg2 4y agoHow exactly do you expect language to increase adoption? It's a chicken and egg problem.
- DoingIsLearning 4y agoPython grew organically. People will use whatever addresses their pains or allows them to solve their problems. More often than not the _perceived_ problem is not performance or memory safety.
- the_mitsuhiko 4y ago> Python grew organically. As opposed to Rust?
- DoingIsLearning 4y agoRust has a huge online community but has not (yet) had a massive industry adoption. GP was asking how that can be achieved.
- Ygg2 4y agoI think that boils down to: A) Get lucky. B) Be the only choice. C) Get a massive corporation to back you. Otherwise you can't ride the network effect to the fullest.
- the_mitsuhiko 4y agoWhich is what I would call "organic growth". The exactly same thing happened with Python originally too. It took a very long time for Python to show up in "the industry" and in many ways it never did because it only shows up in certain parts of it.
- deleted 4y ago[deleted]
- Aissen 4y agoI loaded them before, so it might only be transitional, but many magazine article links are broken(404) for me (including the article).
- pella 4y agobackup: https://archive.md/Aiz5q https://archive.md/Aiz5q original markdown version: https://github.com/RustMagazine/rustmagazine/blob/main/content/issue-1/2022-review-the-adoption-of-rust-in-business.md https://github.com/RustMagazine/rustmagazine/blob/main/conte... --------------- And check the Github issues: https://github.com/RustMagazine/rustmagazine/issues https://github.com/RustMagazine/rustmagazine/issues check: - Call for editors #4 - Call for articles #5
- spicyusername 4y ago404
- lucidguppy 4y agohttp://scihi.org/frederick-great-potato/ http://scihi.org/frederick-great-potato/ To increase rust adoption you need to cultivate FOMO - create an aura of "rust is a secret weapon", which it is in certain cases (safety critical performant code). Rust isn't really meant for prototypes. So don't expect Rust adoption to be in the range of Python or JS/TS. Expect it to max out in C++/Java adoption. It needs a champion web framework like django, rails, or phoenix. Don't give adopters an overabundance of choice, or they'll recoil. It already has a better packager than most languages. If Rust shows that its 10x better than Java and C++ in terms of productivity - it will have no problem getting adoption. Just need more promotion on how much easier it is to work with than C++
- josephg 4y agoI’ve been writing rust full time for the last 2 years, and I’m going to make a bold prediction: I don’t think rust will displace Java at all. Rust is a gorgeous language and I love it, but it optimizes for making good binaries over being easy to learn and use. Java shops don’t use Java because it’s clever, clean or fast. They use Java because it’s a known quantity, it works, it’ll outlive everyone and it’s easy to hire for. Java is popular precisely because it’s not new or shiny. Because there isn’t a new framework every week that you need to learn to stay on top of things. Java is a language for late adopters, who said no to Scala, Clojure and Kotlin. Why would they switch to rust? If rust displaces anything it’ll be systems languages - C and C++ in web browsers, databases, Linux, embedded systems and some video games. And safety critical systems like helicopter control systems. It remains to be seen if it makes any serious inroads in web services. I can still throw web services together in nodejs dozens of times faster than I can in rust. Rust isn’t trying to be the world’s most productive language. Rust would rather complex syntax and fast binaries than simple syntax and slow binaries. So it’ll always be harder to learn than Go, Java, C# or Swift. I honestly think Swift - if it had rust’s tooling and ecosystem - is a better language for general purpose computing. Rust is a lovely language, but like every other language, it’s no magic bullet. Add it to your toolbox, but don’t throw out your other tools.
- zozbot234 4y agoBack in the mid-1990s, Java was the first type- and memory-safe language to be widely adopted in the enterprise. It was, in a sense, the Rust equivalent of its day when compared to the previous standard of C++. It may have been a lot slower and clunkier than C++ back then or Rust today but this mattered less in the 1990s when if anything, its unique cross-platform development story would've made it feasible to seamlessly deploy it on high-performance servers and midrange machines. Sure, today Java/C# are mostly adopted as a matter of convenience but this wasn't always the case.
- eldruin 4y agoFor those getting a 404, here the article in MarkDown: https://github.com/RustMagazine/rustmagazine/blob/main/content/issue-1/2022-review-the-adoption-of-rust-in-business.md https://github.com/RustMagazine/rustmagazine/blob/main/conte...
- ZeroCool2u 4y agoOne of primary reasons that Rust adoption has been stifled at an org I work with is that the cloud provider we use (GCP) doesn't support Rust with client libraries or SDK's. We know there are 3rd party providers, but they're not willing to go without GCP official support and I can't blame them.
- ekidd 4y agoHonestly, when we automate GCP from Rust, we use a thousand lines of hand-written client code and a normal HTTP client. Auth we do using a library. We've also tried the open source GCP client libraries, but they were huge didn't support async at the time. (Still, I'm much happier hand-rolling some HTTP wrappers than using the official Google Python bindings. Those pull in tons of fragile dependencies.)
- ZeroCool2u 4y agoInteresting, I was always pleasantly surprised at how few dependencies the GCP Python bindings pulled in. You are hand-rolling HTTP wrappers though, so I think we have slightly different perspectives :)
- pphysch 4y agoI would put more money on C++ seeing a resurgence contingent on C++ modules getting solid support, than Rust displacing C++ in the enterprise. C++ has a legendary ecosystem, and many great modern language features for writing safe maintainable code, but the antiquated approach to header files makes it painful to learn and unproductive.
- cmrdporcupine 4y agoUnfortunately I think C++ modules are too little too late. It will take a decade for it to propagate fully through the C++ ecosystem, and even then it will remain fragmented in terms of build systems, packaging, coding styles/standards, etc. I'm not expecting C++ to go away, and in fact I actually like working in both C++ and Rust (though prefer Rust) so don't much care. But I don't think the addition of modules is going to lead to a resurgence in the language overall.
- pphysch 4y agoSure, it will take forever for modules to get everywhere, but you only need a few solid frameworks/libraries with module support for it to matter. And the big win IMO is just that it makes it easier to get a MVP off the ground, whether or not it is backed by module-compatible external libraries. The C++ dependency/build story is not that miserable nowadays with modern CMake, git submodules, vcpkg, etc.
- bryanlarsen 4y agoI'd take the other side of that bet.
- ReflectedImage 4y agoRust is quicker to learn, does concurrency really really well and sits in the exact same space as C++. C might survive Rust?, but I think C++ is toast.
- pjmlp 4y agoSo when is the Rust compiler being bootstrapped? Made available on CUDA by NVidia? Made available on Playstation SDK by Sony? Made available on HPC clusters and compiler toolchains by the respective research labs? There so many use cases for C++ that Rust still doesn't have a sound story as replacement.
- azubinski 4y agoIf someone asks me what "almost perfection" is, I will answer: "In 2016, Meta (formerly Facebook) adopted Rust as its “new secure programming language for blockchain”"
- jmartin2683 4y agoWe’re hiring! Hit me up if you’re interested in building tools around Polars and Arrow in Rust.
- pflanze 4y agoHow? You don't have a publicly visible address or company reference in your profile. Edit: you have answered that in https://news.ycombinator.com/item?id=34612364 https://news.ycombinator.com/item?id=34612364
- jmartin2683 4y agoI didn't even know hacker news had profiles :/