1284 views|7 replies

4771

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
 

1127

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
 
 
 

1127

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
 
 
 

6841

Posts

11

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

4771

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
 
 
 

5221

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
 
 
 

7462

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

 
 

731

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

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