https://github.com/tomoat/hello-rust
a learn rust project
https://github.com/tomoat/hello-rust
Last synced: 8 months ago
JSON representation
a learn rust project
- Host: GitHub
- URL: https://github.com/tomoat/hello-rust
- Owner: tomoat
- Created: 2022-01-27T09:05:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-11T17:54:06.000Z (about 4 years ago)
- Last Synced: 2025-03-03T08:14:09.871Z (over 1 year ago)
- Language: Rust
- Size: 170 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## 创建可执行程序的三种方式
### 1、main.rs
### 2、创建 src/bin 目录,在 bin 目录下创建包含 main 函数的的源码文件,可以创建多个文件,`cargo run --bin`
### 3、在 Cargo.toml 文件中配置,指定可执行程序的名称及它的源码路径, `cargo build --release`
```
[[bin]]
name = "hi"
path = "src/hi.rs"
[[bin]]
name = "hello"
path = "src/bin/hello.rs"
```