Breda company brings Rust to the GPU – ‘C ++ is not fast and not secure’

Spread the love

The Breda company Traverse Research is participating in the open source project rust-gpu, a port of the programming language Rust to the gpu. According to Jasper Bekkers of the company, existing languages ​​for developing GPU engines are due for replacement.

Last week rust-gpu appeared on Github . The goal of this open source project is ambitious: to make Rust a first-class language and ecosystem for GPU code. The project’s initiators are compiler engineer Ashley Hauck and rendering engineer Jasper Bekkers. Hauck works at Embark Studios , a game studio founded by former DICE employees. Bekkers is founder of Traverse Research from Breda, a research & development studio for games and graphics related technology. We spoke to Bekkers about his new project.

C ++ and HLSL
“This story actually started ten years ago,” says Bekkers. “I did game training in Breda, previously IGAD at NHTV, now Creative Media and Game Technologies at BUAS. I then did an internship at EA, where I stayed. I worked on the Frostbite engine, among other things. and I programmed a lot for video cards during that period.’We already write all our software in Rust’Bekkers has worked on Star Wars: Battlefront, Mirror’s Edge and Dragon Age: Inquisition , among others . Frostbite’s development team used C ++. In terms of shader language, it was High-Level Shading Language, or HLSL, from Microsoft.

“Those languages ​​are vulnerable to buffer overflows and therefore insecure, they don’t have a package manager, and are prone to errors. I’ve always found that a shame. Since we started with a clean slate, we could use Rust for all our developments and hope to modernize it. “, says Bekkers. When his immediate supervisor founded Embark Studios and started his own company, opportunities arose to do things differently.

“We work with six people in the office and, among other things, contribute to the Embark tech platform. We also build benchmarks for hardware companies. We already write all our software in Rust and are very satisfied with it. All GPU code should actually also be in Rust. should be written so that we can get good integration between GPU and CPU and share code easily. ”

Rust is a low-level programming language that was developed by Mozilla and is partly inspired by C. It is mainly focused on security and through defined memory management stack overflows and buffer overflows should be a thing of the past. It is by far the most loved programming language, judging by the Stack Overflow Developer Survey , and is in stark contrast to C ++. In August, it was announced that Rust will have its own foundation this year, thus breaking away from Mozilla. This should make it clear that it is an independent project with its own legal identity and bank account. The Rust Core Team hopes in this way to attract more investments for further growth. The programming language is now used by Discord, Microsoft, Dropbox and Facebook, among others.

Bekkers: “C ++ crashes often, is not fast and is not secure.” According to him, buffer overflows and memory corruption during programming cost companies time and money. Besides safety, there are more

benefits to Rust. It has, for example, a packaging system, just like npm, and options to seamlessly integrate GPU and CPU code. But switching completely to Rust is still a step too far for the large game companies. “Game developers are hesitant about new technology. A large game engine can easily contain ten million lines of code. The entire industry runs on C ++ and developers are quick to say that they can do everything with it. Moreover, they argue that once adds a new programming language to such a codebase, the whole team must know that language. ”

Successor to Rust Like Shading Language
Rust GPU should be a start to offer a modern alternative. In fact, the predecessor of rust GPU was that beginning: Rust Like Shading Language, or RLSL, a project that Maik Klein van Embark started three years ago. Klein no longer had time for RLSL, but is now contributing to rest GPU , which builds on his project. A total of eight people are now working on the project and the goal is to build a community of developers.

For now, the project is in an early phase. Version 0.1 only works with compiling and running very simple shaders and compiling parts of the Rust Core Library. Bekkers has developed an air as an example shader. The project has drawn up a roadmap with six levels, with the final stage ‘all the cool kids use shaded rest’. Now there is still talk of the prototype stage.

You might also like
Exit mobile version