1253 views|7 replies

4764

Posts

12

Resources
The OP
 

《Rust in Action》Come and write the first hello_eeworld with me [Copy link]

The above post explains how to install Rust on Windows and configure VScode to write code

"Rust in Action" Windows Installation

Basically, once you have installed rust and cargo, you should see the following screen in the command line. If not, you need to configure the environment variables.

Share my environment variables

Then open the famous vscode.

Let me recommend a few plugins first.

# 1.rust-analysis
社区更新的插件,比原生好太多,不得不说,软件生态才是王道。
# 2.Even Better TOML,
支持 .toml 文件完整特性,rust需要的,楼主刚刚入门还不是很了解。
# 3.Error lens
可以极大程度提高你的编程能力,更好更美观的错误提示。

After installing the plug-in and configuring it basically, you can start running smoothly.

It is also very simple to create a new project in rust

$ cargo new 你的项目名
$ tree

When you see the green line, it means you have successfully created a new project.

I am here hello_eeworld

Take a look at the tree to see what the project contains. I have to say that cargo is automatic and worry-free, git and toml are all ready.

The main.rs file is where we write code. The first program written in code is always hello world.

The default is to print the same output.

Save it and enter it in the terminal

$ cargo run

Mission accomplished~~~

Don't be surprised, my friends. Rust is compiled to generate exe for running, so the target folder and many files will be automatically generated in the folder, which is done in one go and very comfortable.

Some people say that Rust is a language that neither academics nor engineers can find fault with.

I think it's quite interesting, but you have to experience it before you can have a say.

This post is from Programming Basics

Latest reply

The Rust introductory tutorial shared by the OP is very creative and fascinating. I hope the OP will continue to   Details Published on 2024-4-11 06:54
 

1106

Posts

1

Resources
2
 

I didn’t expect that Brother Simeng is also an ASCII graphics enthusiast... This, this, emmmm

I moved here too.

This post is from Programming Basics
 
 
 

1106

Posts

1

Resources
3
 

I just followed the Bible's teachings to get here, that's all. I will take the next step step by step.

This post is from Programming Basics
 
 
 

6818

Posts

11

Resources
4
 
This hello world is very creative! Awesome!
This post is from Programming Basics
 
 
 

4764

Posts

12

Resources
5
 

Make up a print

Rust's multi-line text contains escape characters that can be enclosed in r# and #.

r#"
你的多行或者单行内容
"#

This post is from Programming Basics

Comments

nmg
I saw eeworld  Details Published on 2024-4-10 15:56
 
 
 

5213

Posts

239

Resources
6
 
Azuma Simeng posted on 2024-4-10 15:44 Add a print Rust multi-line text contains escape characters can be wrapped with r# and #. r#" Your multi-line or single line...

I saw eeworld

This post is from Programming Basics
Add and join groups EEWorld service account EEWorld subscription account Automotive development circle
 
 
 

7422

Posts

2

Resources
7
 

At first glance, I thought it was just printing characters, but after a second look, I realized there was something else going on. . .

This post is from Programming Basics
 
Personal signature

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

 
 

718

Posts

4

Resources
8
 

The Rust introductory tutorial shared by the OP is very creative and fascinating. I hope the OP will continue to

This post is from Programming Basics
 
 
 

Just looking around
Find a datasheet?

EEWorld Datasheet Technical Support

Featured Posts
MATLAB APP Designer serial port debugging tool writing

This post was last edited by lb8820265 on 2019-5-9 23:11 Previously, we introduced two ways to use VC6 to make serial ...

About the original picture and packaging

Does anyone have the original picture and package of STM32F103 series?

How to use CPLD to collect asynchronous signals

Scenario: Use CPLD to decode a serial data channel. The data has no accompanying clock and has a fixed frequency but a d ...

Measuring poles and zeros from a Bode plot

This post was last edited by Jack315 on 2021-1-25 00:52 The transfer function of a single zero is: 522846 The Bode plot ...

Encoder counting principle and motor speed measurement principle - multi-picture analysis

This post was last edited by DDZZ669 on 2021-2-14 23:30 Encoder is a sensor used to measure mechanical rotation or displ ...

35 "Ten Thousand Miles" Raspberry Pi Car——ROS Learning (Realizing Hello World)

The best way to learn ROS is to use it. The ROS official website has a Chinese version of the tutorial . After install ...

36 "Ten Thousand Miles" Raspberry Pi Car——ROS Learning (VSCode to Implement Hello World)

It is very convenient to run ROS projects in VSCode. In this section, we use ROS to write and run the "Hello world" pro ...

[The strongest open source] Hand-rubbed 120W switching power supply

I recently took the time to make a switching power supply 645265 645262 645263 645264 645261 645260

Record a blue screen pit

I mentioned a while ago that my company's computers would occasionally blue screen. Now I think about it, the blue scree ...

ESP8266 01+DHT11 acquisition

Could anyone give me some advice? When I collect DHT11 data through one of GPIO 0 and 2, the 8266 01 keeps restarting. O ...

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