From 8361e13383166664a1e59c21e5c34f3508653fd7 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 2 Nov 2017 20:00:43 +0100 Subject: [PATCH] Add lang/rust/README.org --- modules/lang/rust/README.org | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 modules/lang/rust/README.org diff --git a/modules/lang/rust/README.org b/modules/lang/rust/README.org new file mode 100644 index 000000000..7469620c3 --- /dev/null +++ b/modules/lang/rust/README.org @@ -0,0 +1,51 @@ +#+TITLE: :lang rust + +#+begin_quote +This module is a work in progress. +#+end_quote + +This module adds [[https://www.rust-lang.org][Rust]] support to Emacs. + ++ Code completion (~racer~) ++ Syntax checking (~flycheck~) ++ Eldoc support (~go-eldoc~) ++ [[https://github.com/hlissner/emacs-snippets/tree/master/rust-mode][Snippets]] + +#+begin_quote +... +#+end_quote + +* Table of Contents :TOC: +- [[#install][Install]] + - [[#rust][Rust]] + - [[#dependencies][Dependencies]] + +* Install +** Rust +To get started with Rust, you can either use =rustup= and install rust with: + +~curl https://sh.rustup.rs -sSf | sh~ + +Or through your package manager (which is my preference): + +*** MacOS +#+BEGIN_SRC sh :tangle (if (doom-system-os 'macos) "yes") +brew install rust +cargo install racer +#+END_SRC + +*** Arch Linux +#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes") +sudo pacman --needed --noconfirm -S rust rust-racer +#+END_SRC + +** Dependencies +This module requires ~racer~ for code completion, which also requires access to Rust's source code. + +#+BEGIN_SRC sh +cargo install racer +git clone https://github.com/rust-lang/rust $RUST_SRC_PATH +#+END_SRC + +Either set ~$RUST_SRC_PATH~ in your shell (so that it's available in Emacs), or adjust ~+rust-src-dir~ to point at the correct directory. +