From c84d94874d63e848628df3cfd9ce45b507ae9579 Mon Sep 17 00:00:00 2001 From: Jose Quintana Date: Fri, 11 Mar 2022 22:54:28 +0100 Subject: [PATCH] docs: building from source [skip ci] --- docs/content/building-from-source.md | 19 +++++++++++++++++++ docs/mkdocs.yml | 1 + 2 files changed, 20 insertions(+) create mode 100644 docs/content/building-from-source.md diff --git a/docs/content/building-from-source.md b/docs/content/building-from-source.md new file mode 100644 index 0000000..1d12c07 --- /dev/null +++ b/docs/content/building-from-source.md @@ -0,0 +1,19 @@ +# Building from Source + +If you want to build **`SWS`** from source, all what you need is to have a [Rust 2021 Edition](https://blog.rust-lang.org/2021/05/11/edition-2021.html) installed. + +Make sure to install Rust [1.56.0](https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html) or higher (or nightly) along with [the toolchain(s)](https://rust-lang.github.io/rustup/concepts/toolchains.html) of your preference. + +Then clone the repository and use [Cargo](https://doc.rust-lang.org/cargo/) to build the project from source. + +```sh +git clone https://github.com/joseluisq/static-web-server.git +cd static-web-server +cargo build --release +``` + +Finally, the release binary should be available at `target/release/static-web-server`. + +!!! info "Note" + Please don't use the project's `Makefile` since it's only intended for development and some on-demand tasks. + diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 48d6a56..9b74b66 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -118,6 +118,7 @@ nav: - 'Configuration': - 'Command Line Arguments': 'configuration/command-line-arguments.md' - 'Environment Variables': 'configuration/environment-variables.md' + - 'Building from Source': 'building-from-source.md' - 'Features': - 'HTTP/1': 'features/http1.md' - 'HTTP Methods': 'features/http-methods.md' -- libgit2 1.7.2