1
0
mirror of https://github.com/actix/actix-website synced 2024-11-24 08:43:01 +01:00
actix-website/content/docs/installation.md

54 lines
1.5 KiB
Markdown
Raw Normal View History

2018-05-22 23:15:08 +02:00
---
title: Installation
menu: docs_intro
weight: 110
---
# Installing Rust
Since `actix-web` is a Rust framework you will need Rust to get started with it.
If you don't have it yet we recommend you use `rustup` to manage your Rust
installation. The [official rust
2019-06-12 10:51:45 +02:00
guide](https://doc.rust-lang.org/book/ch01-01-installation.html)
2018-05-22 23:15:08 +02:00
has a wonderful section on getting started.
2019-06-13 05:53:04 +02:00
We currently require at least Rust {{< rust-version "actix-web" >}} so make sure you
run `rustup update` to have the latest and greatest Rust version available. In
particular this guide will assume that you actually run Rust
{{< rust-version "actix-web" >}} or later.
2018-05-22 23:15:08 +02:00
# Installing `actix-web`
2019-06-12 10:51:45 +02:00
Thanks to Rust's `cargo` package manager you won't need to explicitly install
2018-05-22 23:15:08 +02:00
`actix-web`. Just depend on it and you're ready to go. For the unlikely
2019-06-19 20:53:45 +02:00
case that you want to use the development version of `actix-web` you can
2018-05-22 23:15:08 +02:00
depend on the git repository directly.
Release version:
```ini
[dependencies]
actix-web = "{{< actix-version "actix-web" >}}"
```
Development version:
```ini
[dependencies]
2018-05-28 15:43:34 +02:00
actix-web = { git = "https://github.com/actix/actix-web" }
2018-05-22 23:15:08 +02:00
```
# Diving In
There are two paths you can take here. You can follow the guide along or if
you are very impatient you might want to have a look at our
[extensive example repository](https://github.com/actix/examples) and run the
included examples. Here for instance is how you run the included `basics`
example:
```
git clone https://github.com/actix/examples
cd examples/basics
cargo run
```