ProbeerGOLD- Free

MakerSpace
Linux Magazine|#289/December 2024: Coding with AI
Rust, a potential successor to C/C++, claims to solve some memory safety issues while maintaining high performance. We look at Rust on embedded systems, where memory safety, concurrency, and security are equally important
- Andrew Malcolm
MakerSpace

For decades, C and increasingly C++ have been the languages of choice for microcontroller development, with assembler reserved for optimizations and start-up code. Most vendors provide free development IDEs, and most of these use GNU compilers under the hood. Some of the IDEs come with initialization code and generate device configuration code (choosing I/ O functionality, etc.), so a device can be configured in a point-and-shoot manner letting you concentrate on writing application code. Similarly, manufacturers of I/ O devices such as sensors and wireless modules supply drivers and example code.

C/ C++ is an easy-to-learn language, but it’s also easy to abuse and to write buggy code. Embedded code is expected to run unattended, often in hostile environments where code updates are difficult if not impossible. Increasingly, these devices are Internet-connected. While this means easier code updates, it requires a significant amount of extra effort to do well, and ironically this very connectivity lays the device open to nefarious access attempts. I know that there are tools available that help to minimize the risk of bad code getting into a product, and it is certainly not easy to consider rewriting large legacy codebases in another language, but I think that Rust [1] has come far enough and has sufficient advantages over C/ C++ to be considered for new code and for re-writing critical sections of existing code as a stepping stone to a full Rust implementation.

With that being said, this article is intended as a “getting started” guide: Adoption of Rust is a big step in a commercial environment, and one of the best ways to evaluate a new language is to try it! In today’s world of low-cost development boards and free software tools, all it takes is a little time and determination. Then you can base your decisions on some real-life experience.

Dit verhaal komt uit de #289/December 2024: Coding with AI editie van Linux Magazine.

Start your 7-day Magzter GOLD free trial to access thousands of curated premium stories, and 9,000+ magazines and newspapers.

Dit verhaal komt uit de #289/December 2024: Coding with AI editie van Linux Magazine.

Start your 7-day Magzter GOLD free trial to access thousands of curated premium stories, and 9,000+ magazines and newspapers.

MORE ARTICLES FROM {{MAGNAME}}Alles Bekijken
MADDOG'S DOGHOUSE
Linux Magazine

MADDOG'S DOGHOUSE

Planning and community effort can help welcome Linux beginners online without precluding more advanced discussions.

time-read
3 mins  |
#293/April 2025: Trojan Horse
Cash as Cash Can
Linux Magazine

Cash as Cash Can

Mike Schilli uses the YNAB tool to keep an eye on his finances. Until recently, YNAB didn't have a terminal Ul programmed in Go, but Mike delivers it here.

time-read
9 mins  |
#293/April 2025: Trojan Horse
Innovator
Linux Magazine

Innovator

Re-inventing the Ubuntu experience

time-read
4 mins  |
#293/April 2025: Trojan Horse
Play video games natively on Linux Gaming Your Way
Linux Magazine

Play video games natively on Linux Gaming Your Way

Bazzite, an immutable Linux distro adapted for gaming, lets you play your favorite video games on your PC, handheld, or home theater PC.

time-read
9 mins  |
#293/April 2025: Trojan Horse
Installing mods on Steam Deck Steam Gems
Linux Magazine

Installing mods on Steam Deck Steam Gems

The Steam Deck gaming console offers a galaxy of creative modifications for the games you love to play.

time-read
10+ mins  |
#293/April 2025: Trojan Horse
Zack's Kernel News
Linux Magazine

Zack's Kernel News

Chronicler Zack Brown reports on the latest news, views, dilemmas, and developments within the Linux kernel community.

time-read
9 mins  |
#293/April 2025: Trojan Horse
System Monitoring
Linux Magazine

System Monitoring

Mission Center, a graphical system monitor, groups all important system statuses in a compact, intuitive interface.

time-read
4 mins  |
#293/April 2025: Trojan Horse
Exploring the Unbound DNS resolver Unbound
Linux Magazine

Exploring the Unbound DNS resolver Unbound

The Unbound DNS resolver offers comprehensive security and many other useful features.

time-read
8 mins  |
#293/April 2025: Trojan Horse
MakerSpace
Linux Magazine

MakerSpace

If you need to store long-term historical data, you can cobble together some Arduino modules, sensors, and displays and get them all to talk to an SQL server.

time-read
6 mins  |
#293/April 2025: Trojan Horse
Mix It Up
Linux Magazine

Mix It Up

Solve Bash blind spots by embedding other scripting languages into your Bash scripts to get the features you need. Pete shows you solutions for floating-point math, charting, GUIs, and hardware integration.

time-read
6 mins  |
#293/April 2025: Trojan Horse

We gebruiken cookies om onze diensten aan te bieden en te verbeteren. Door onze site te gebruiken, geef je toestemming voor cookies. Lees meer