Skip to content

Commit

Permalink
Добавлено: Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
fiersik committed Jan 24, 2024
1 parent 02697f4 commit 7a489ad
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ export default defineConfig({
},
{
text: 'Rust',
link: '/rust',
items: [
{ text: 'приложение на GTK4', link: 'rust-gtk4-applications'}
],
Expand Down
63 changes: 63 additions & 0 deletions docs/developers/rust.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Rust

Rust — это современный системный язык программирования, разработанный для обеспечения безопасности, скорости и параллелизма. Он известен своей строгой системой типов и защитой от ошибок.

## Установка с официального сайта

```shell
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

## Обновление

```shell
rustup update
```

## Использование Rust

### Создание нового проекта:

```shell
cargo new NAME
```

`NAME` — название проекта.

::: details Пример архитектуры
```shell
new_project
├── Cargo.lock
├── Cargo.toml
├── .git/
├── .gitignore
└── src/
└── main.rs
```
:::

### Указание зависимостей:

```shell
cargo add NAME
```

`NAME` — название зависимости.

### Dev сборка:

```shell
cargo build
```

### Release Сборка:

```shell
cargo build --release
```

### Запуск проекта:

```shell
cargo run
```

0 comments on commit 7a489ad

Please sign in to comment.