Discover your dream Career
For Recruiters

It's not just Python. You need to learn Rust

If you want a programming job in finance right now, you probably need to learn Python: Goldman Sachs is currently advertising around 320 jobs which mention Python, J.P. Morgan is advertising 809.  But if you want a programming job in finance in future, you might want to familiarize yourself with a language that's far more niche: Rust. Rust's advocates suggest it will become the next big thing, in time.

Expertise in Rust isn't going to get you a job tomorrow, but it is making small incursions into big banks. J.P. Morgan has one tiny Rust job, working on its interesting Roar big data project.  Goldman Sachs has no Rust jobs at all, but its advocates insist that it will soon because Rust has several important things going for it.

"I mainly program Python and I know about all its dirty and unpleasant corners," says one quantitative developer who programs in Rust in his spare time. "By comparison, Rust feels refreshingly new."

A self-described open source, 'systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety,' Rust is likely to replace C and C++ rather than Python. "Rust is a systems programming language that can be used to build large, efficient, stable systems," says the developer. "It might be something as fundamental as an operating system, or something as fast as a trading system in a hedge fund." Right now, C++ is frequently used in high frequency trading because it's fast, but Rust is faster still, and it comes with special extra advantages.

"What makes Rust outstanding is its safety," says the quant developer. "The language is designed in such a way that it checks during compile time that there are no circumstances where the program will be left hanging in uncertain memory conditions." While C++ purports to offer similar features, they can be circumvented by 'developer arrogance' from programmers convinced their code is fine. "In Rust, the program is designed so that if it actually starts, you can be very sure that it will not corrupt the system memory because it ends up doing things that you simply didn't anticipate," says the quant.

This means that Rust is a much safer language to use than its predecessors. "Rust is applicable where runtime efficiency and safety are core needs," says another developer. For the moment, the language is mostly used by Mozilla to power its Firefox browser, but advocates say it will surely be taken up by banks in time.

"Technically, Rust can do everything," says the Python programming quant. "I'm currently exploring its capabilities in numerical and analytical coding for financial applications - PDE solving, option pricing, etc. With Rust, I've felt for the first time that you "can have the cake and eat it too."

Unlike C++, Python and Java, which are object oriented programming languages (OOP), Rust is a 'trait-based' programming language. This means that, 'rather than building a structure and giving it abilities like in the OOP world, you need to define the behaviour on an abstract level," says the quant. "You then define this behaviour for particular data structures, therefore separating the data from the behaviour." He says this takes some "relearning" - especially if you're used to thinking in OOP terms.

The extra effort is deemed to be worth it. Supporters say Rust is the first real programming language for the 21st century. "Modern software must be able to scale to multiple threads and processes, and to communicate with external traffic much more," says the quant. "I have had much more success in writing parallel and asynchronous programs in Rust than I ever had in C++ or C, plus the safety-first principles bring the language into one of the best positions to write stable, extendable parallel code."

Of course, there are downsides. The main one is that Rust isn't much used yet and won't get you a job for the foreseeable future. The security features also come with a cost, although some would argue that it's one worth paying. "As a developer you have to think more actively about what can go wrong with your program," says the quant. "Because if there's something that can go wrong, then Rust will not let you build the binary until you can guarantee that nothing bad can happen. - By comparison, in C you can just build an 'unsafe' binary and try not to use it in an unsafe way. This is why there's so much faulty code out there."

Rust is growing slowly. A January 2018 compilation of development activity on Github put Rust 18th with a gradually accreting user-base. JavaScript, Python, Java and C++ were in the top slots and languages like Go were growing much faster. However, Rust fans say Go is prone to the sorts of concurrency errors that don't appear with Rust, and that it's still early days for a language that's steadily gaining ground.

"Rust is a pleasure to work with. It has many advantages, and given time to mature its ecosystem it will become a real treasure in the future," says one developer. You might want to start learning it now.

Have a confidential story, tip, or comment you’d like to share? Contact: in the first instance. Whatsapp/Signal/Telegram also available.

Bear with us if you leave a comment at the bottom of this article: all our comments are moderated by human beings. Sometimes these humans might be asleep, or away from their desks, so it may take a while for your comment to appear. Eventually it will – unless it’s offensive or libelous (in which case it won’t.)

AUTHORSarah Butcher Global Editor
  • Al
    3 February 2019

    Rust is the kind of thing we need more off, an open-source fresh look at systems level (and more!) programming. 50% of all vulnerabilities are due to buffer overflows. How many are due to the errors that Rust prevents? I can see rust as the future of safe, secure programming. In 20 years you'll be crazy if you aren't maintaining some legacy system trying to use C++/C.

  • Ma
    13 December 2018

    Python and Rust are just one of the plethora of languages to choose from if you are looking to get into coding within the investment industry.

    Rust, Python , R, C#, Kotlin are all valid choices. These days employers are less interested in hiring for a specific language. Rather they want to see experience in problem solving skills. Exposure and hobby projects in any of the popular languages help.

    Here is a free guide to 'picking a programming as an investment professional' where I discuss the above in more detail:

  • KW
    24 November 2018

    I think Rust will break into finance given time but it's still quite a ways off. Finance would probably be one of the later industries to adopt it because so many fundamental and large systems would need rewriting, and the general inertia in adopting new technologies, despite its merits.

  • da
    21 November 2018

    nice try, it will not last

Sign up to our Newsletter

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.

Boost your career

Find thousands of job opportunities by signing up to eFinancialCareers today.
Recommended Jobs
Garrison Associates, LLC
Quantitative Developer
Garrison Associates, LLC
Manhattan, United States
Quantitative Developer
Oakridge Staffing
Stamford, United States

Sign up to our Newsletter

The essential daily roundup of news and analysis read by everyone from senior bankers and traders to new recruits.