# Getting Started

## Rust and Cargo

writing code

```rust
fn main(){ //main function
 println!("hello"); //print statement
}
```

compiling the code

```rust
rustc <filename>
```

## Cargo

making new project

```rust
cargo new <package name>
```

For building the project

```rust
cargo build hello.rs
```

For checking the code but not making executable

```rust
cargo check
```

For running the project

```rust
cargo run  
```

OR

```rust
./target/debug/hello_cargo
```


---

# 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://overflow.kshitijraj.dev/knowledge-base/rust/getting-started.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.
