# 起步-helloworld

创建目录

```
mkdir hello_world
cd hello_world
```

创建main.rs

```rust
//第二，println! 调用了一个 Rust 宏（macro）。如果是调用函数，则应输入 println（没有!）
fn main() {
    println!("Hello, world!");
}
```

编译

```
$ rustc main.rs
$ ./main
Hello, world!
```

目录会多出编译文件（在 Windows 上，输入命令 `.\main.exe`，而不是 `./main`：）

![](/files/-LokoUfT8kBoEokAES8e)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://im-qianuxn.gitbook.io/pytorch/ji-suan-ji/rust/qi-bu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
