From 0c84593c19ee11a4f77b487de3650e51f2cafd54 Mon Sep 17 00:00:00 2001
From: Kostas Tsiligkiris <ktsiligkiris@outlook.com>
Date: Sun, 20 Feb 2022 14:24:55 +0200
Subject: [PATCH] [DOCS] Add module for Rust language

The rust.md was based on python.md module.
---
 docs/index.md        |  2 +-
 docs/modules/rust.md | 38 ++++++++++++++++++++++++++++++++++++++
 mkdocs.yml           |  1 +
 3 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 docs/modules/rust.md

diff --git a/docs/index.md b/docs/index.md
index b5ab312..dd88243 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -98,7 +98,7 @@ The following programming languages have enhanced support in Prelude:
 - [Python](modules/python.md)
 - Racket
 - [Ruby](modules/ruby.md)
-- Rust
+- [Rust](modules/rust.md)
 - Scala
 - [Scheme](modules/scheme.md)
 - SCSS
diff --git a/docs/modules/rust.md b/docs/modules/rust.md
new file mode 100644
index 0000000..3c88d35
--- /dev/null
+++ b/docs/modules/rust.md
@@ -0,0 +1,38 @@
+# Prelude Rust
+
+!!! Note
+
+    This module builds on top of the shared [Programming](programming.md) module.
+
+## Package Prerequisites
+
+For the proper functioning of this module, you'll need to install the
+following packages in your system:
+
+* `rustc` (Rust compiler)
+* `cargo` (Rust package manager)
+* `rustfmt` (Rust tool for formatting code)
+* `racer` (Rust completion tool, not necessary if `prelude-lsp` is enabled)
+* `rls` (Rust Language Server, if the `prelude-lsp` feature is enabled)
+
+## Rust Mode
+
+Emacs comes with Rust programming support through the built-in
+`rust-mode`. Whenever you are editing Rust code run <kbd>C-h m</kbd> to
+look at the Rust mode key bindings.
+
+## Syntax checking
+
+Prelude ships with [Flycheck](https://github.com/flycheck/flycheck),
+an on the fly syntax checker. Flycheck has support for Rust. Rust is
+automatically setup in flycheck, by executing
+`flycheck-rust-setup`. If the current file is part of a Cargo project,
+flycheck is configured according to the Cargo project layout.
+
+## Cargo integration
+
+Along with `rust-mode`, `cargo-minor-mode` is also configured. You can
+give cargo commands from inside the buffer to run cargo commands, like
+<kbd>C-c C-c C-b</kbd> for `cargo-process-build`, <kbd>C-c C-c
+C-t</kbd> for `cargo-process-test` and <kbd>C-c C-c C-r</kbd> for
+`cargo-process-run`
diff --git a/mkdocs.yml b/mkdocs.yml
index c9d3f02..4d57da0 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -20,6 +20,7 @@ pages:
     - Dart: modules/dart.md
     - Python: modules/python.md
     - Ruby: modules/ruby.md
+    - Rust: modules/rust.md
 - FAQ: faq.md
 - Troubleshooting: troubleshooting.md
 - Contributing: contributing.md