Add lang/rust/README.org
This commit is contained in:
parent
60d6335acb
commit
8361e13383
1 changed files with 51 additions and 0 deletions
51
modules/lang/rust/README.org
Normal file
51
modules/lang/rust/README.org
Normal file
|
@ -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.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue