1551 views|8 replies

2865

Posts

4

Resources
The OP
 

"Rust Practice" RUST language application issues in embedded systems [Copy link]

Rust is becoming more and more popular. Recently, I saw a piece of news: the 3.0 version of the famous open source database InfluxDB was rewritten using rust. Previous versions of InfluxDB were written in GOlang. After writing in rust, the performance has been significantly improved, which shows that the status of rust is gradually improving, but most of these improvements are in the writing of large-scale applications. As an embedded system, rust's progress does not seem to be so fast. So what problems has rust encountered in the embedded system?

First, it is not easy to write Rust programs for small embedded systems. The main reason is that chip manufacturers are not very active in supporting Rust, resulting in few native application libraries for Rust. Moreover, many of them require the combination of C libraries, which increases the workload.

Second, Rust is very strict about memory management, which results in low writing efficiency. Embedded applications are often memory-constrained. For example, the memory of 8051 is only 128 bytes, which requires very high programming skills and sophisticated data structures. Rust has many limitations, which makes writing difficult.

3. The urgency is not enough. Rust's strengths are memory management and concurrent programs, but these are not very prominent problems in embedded programs. Embedded programs rarely have large-scale input/output interactions, and the demand for concurrent programs is not high. Even the task model is a very traditional front-end and back-end, commonly known as a "big loop".

The above problems are all problems of Rust language in embedded applications, but with the development of applications such as IoT, AI, GUI, etc., Rust should gradually develop.

At present, learning rust in the embedded field is still a good direction.

This post is from Programming Basics

Latest reply

Rust is not easy to learn. Many people who work on microcontrollers can only copy C. If it comes to Rust, it will be very annoying to use it on a microcontroller.   Details Published on 2024-4-22 20:24
 

2865

Posts

4

Resources
2
 

Rust's tools are also a shortcoming. Rust only implements the functions of the syntax layer, and the runtime uses LLVM. It needs to cooperate with the implementation of LLVM, so the debugging and running of Windows require the support of MS VC and GUN C libraries.

This post is from Programming Basics
 
 
 

1w

Posts

25

Resources
3
 

It takes a long time for a new language to improve its ecosystem.

This post is from Programming Basics
 
 
 

91

Posts

0

Resources
4
 

It takes a long time for a new language to improve its ecology. Thanks for sharing.

This post is from Programming Basics
 
 
 

6821

Posts

11

Resources
5
 

I am still learning and hope to use rust to develop stm32 as soon as possible and contribute to its community.

This post is from Programming Basics
 
 
 

1108

Posts

1

Resources
6
 

The runtime requires LLVM, is this an advantage or a disadvantage?

I checked Baidu Encyclopedia and it seems pretty good.

Thanks bigbat for sharing

This post is from Programming Basics
 
 
 

1108

Posts

1

Resources
7
 

Advantages of LLVM (moving bricks:)

1) Modern design

LLVM is designed to be highly modular, making its code clearer and easier to troubleshoot.

2) Language-independent intermediate code

On the one hand, this makes it possible to connect different languages together through LLVM; it also enables LLVM to interact and integrate closely with IDEs .

On the other hand, releasing intermediate code instead of target code can better realize its potential on the target system without compromising debuggability (ie, generating target code for the local hardware environment on the target system , but being able to perform line-level debugging directly through the intermediate code)

3) As a tool and library

The tools provided by LLVM make it relatively easy to implement an optimizing compiler or VM for a new programming language , or to introduce better optimization/debugging features for existing programming languages. [5]

This post is from Programming Basics
 
 
 

721

Posts

4

Resources
8
 

Can any friend give a systematic introduction to the Rust language? In what fields is the Rust language widely used?

This post is from Programming Basics
 
 
 

7422

Posts

2

Resources
9
 

Rust is not easy to learn. Many people who work on microcontrollers can only copy C. If it comes to Rust, it will be very annoying to use it on a microcontroller.

This post is from Programming Basics
 
Personal signature

默认摸鱼,再摸鱼。2022、9、28

 
 

Guess Your Favourite
Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
快速回复 返回顶部 Return list