软件开发的门槛越来越低了

#头条创作挑战赛# 开发程序的门槛越来越低,学习一门编程语言也变得轻松多了。在学校刚开始学习C语言时,配置个开发环境就的许久,还经常遇到缺少这个缺少那个的,环境配置好,半天就过去了。

最近接触到了 Rust 变成语言, 风格与C语言类似,但是开发起来轻松多了。

创建项目, 一个命令搞定

$ cargo new hello_world     Created binary (application) `hello_world` package

然后一条命令就可以编译运行,

$ cd hello_world;$ cargo run   Compiling hello_world v0.1.0 (D:projctshello_world)    Finished dev [unoptimized + debuginfo] target(s) in 0.50s     Running `targetdebughello_world.exe`Hello, world!

有没有感觉很方便。

下面看看程序的结构,配置文件,及code

$ ls -lR.:total 1-rw-r--r-- 1 pp 197121 180 Nov 15 21:33 Cargo.tomldrwxr-xr-x 1 pp 197121   0 Nov 15 21:33 src/./src:total 1-rw-r--r-- 1 pp 197121 45 Nov 15 21:33 main.rs$ cat Cargo.toml[package]name = "hello_world"version = "0.1.0"edition = "2021"# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html[dependencies]$ cat src/main.rsfn main() {    println!("Hello, world!");}

声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!

上一篇 2022年10月9日
下一篇 2022年10月9日

相关推荐