Rust Code Completion utility

    The proportion of a program’s runtime that
    occurs in a routine is proportional to the
    width of the bar for that routine.

Language references


Rosetta: rust vs swift vs scala


curl -sSf | sh


Rust by example

Introduction - Rust By Example

A little bit of functional programming


An simple example project

Why I Ripped The Same CD 300 Times

Josef “Jeff” Sipek Rust Pointers for C Programmers

Koans / interactive tutorial

Set up racer for emacs / vim



rustup uninstall stable
rustup install stable
rustup show
rustup component add rls
rustup component add rls rust-analysis rust-src
rustup component add rls-preview
rustup self update
RUST_LOG=debug rustup self update

# for rustic emacs
rustup component add --toolchain nightly clippy

Setup experience

Rusti needs this particular version of the toolchain to compile

rustup install nightly-2016-08-01

This is how you compile from github

rustup run nightly-2016-08-01 cargo install --git
  • But if you do that, you also need to run the program with rustup
rustup run nightly-2016-08-01 /home/shane/.cargo/bin/rusti

This way, I was unable to compile racer

Install rust

agi rustc rust-src rust-gdb rust-doc

# Appeared to not work
agi rust-lldb

Install racer

Rust Code Completion utility

  • What would ya know, its the exact command
cargo install racer
  • Failed
Why the **\*\*** does everything I try to install on ubuntu fail while building.

<cargo racer build failed>


agr rustc rust-src rust-gdb rust-doc


Install rust and cargo

curl -sSf | sh

Install racer

cargo install racer

This failed again. Still having [different] compilation problems with racer.

Install nightly

rustup install nightly
rustup default nightly

Install rust sources so racer autocomplete can work in emacs

rustup component add rust-src

An LSP setup for emacs

  ;; Rust settings
  (require 'rust-mode)
  (with-eval-after-load 'rust-mode
    ;; Rust Formatter. Run rustfmt before saving rust buffers
    (setq rust-format-on-save t))

  (require 'lsp-mode) ;; language server protocol
  (with-eval-after-load 'lsp-mode
    (add-hook 'rust-mode-hook #'lsp))
  ;; (add-hook 'rust-mode-hook #'flycheck-mode))

  ;; excessive UI feedback for light reading between coding
  (require 'lsp-ui)
  (with-eval-after-load 'lsp-ui
    (add-hook 'lsp-mode-hook 'lsp-ui-mode))

  ;; autocompletions for lsp (available with melpa enabled)
  (require 'company-lsp)
  (push 'company-lsp company-backends)

  ;; tell company to complete on tabs instead of sitting there like a moron
  (define-key rust-mode-map (kbd "TAB") #'company-indent-or-complete-common))