Rust

http://qiita.com/masayadk1229/items/08c5e384604f368c1762

ryoji@ubuntu:~$ curl https://sh.rustup.rs -sSf | sh
info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust programming 
language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin 
directory, located at:

  /home/ryoji/.cargo/bin

This path will then be added to your PATH environment variable by modifying the
profile file located at:

  /home/ryoji/.profile

You can uninstall at any time with rustup self uninstall and these changes will
be reverted.

Current installation options:

   default host triple: x86_64-unknown-linux-gnu
     default toolchain: stable
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
1

info: syncing channel updates for 'stable-x86_64-unknown-linu

vim .bashrc

#Rust 
export PATH="$HOME/.cargo/bin:$PATH"
ryoji@ubuntu:~$ cargo install racer
    Updating registry `https://github.com/rust-lang/crates.io-index`
cargo install cargo-edit
  = note: /usr/bin/ld: cannot find -lssl
          /usr/bin/ld: cannot find -lcrypto
          collect2: error: ld returned 1 exit status
          

error: aborting due to previous error

error: failed to compile `cargo-edit v0.1.6`, intermediate artifacts can
sudo apt-get install libssl1.0.0 libssl-dev

  Installing /home/ryoji/.cargo/bin/cargo-list
  Installing /home/ryoji/.cargo/bin/cargo-add
  Installing /home/ryoji/.cargo/bin/cargo-rm
success

https://askubuntu.com/questions/339364/libssl-so-10-cannot-open-shared-object-file-no-such-file-or-directory

rustup component add rust-src
 cargo install rusty-tags
 cargo install rustfmt

Atom Editor

ryoji@ubuntu:~$ sudo add-apt-repository ppa:webupd8team/atom
[sudo] password for ryoji: 
 PPA for Atom text editor: https://atom.io

Now available for both 32bit and 64bit!

More info, report packaging bugs, feedback, etc.: http://www.webupd8.org/2014/05/install-atom-text-editor-in-ubuntu-via-ppa.html

sudo apt update
sudo apt install atom

https://mzumi.github.io/2016/02/29/rust-development-environment/

apm install language-rust linter linter-rust racer atom-beautify
apm install language-rust
apm install racer
apm install linter
apm install linter-rust
apm install atom-ctags
apm install script

Edit > Preferences
/file/Rust/edit_preference_packages_rust.png

apm install language-rust
apm install racer
apm install linter
apm install linter-rust
apm install build
apm install build-cargo
apm install atom-ctags

http://qiita.com/nacika_ins/items/044c87fd8bd1d7c41191

Run

ryoji@ubuntu:~$ cargo new hello_world --bin
     Created binary (application) `hello_world` project
ryoji@ubuntu:~$ cd hello_world/
ryoji@ubuntu:~/hello_world$ ls
Cargo.toml  src
ryoji@ubuntu:~/hello_world$ atom
ryoji@ubuntu:~/hello_world$ cargo run
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `target/debug/hello_world`
Hello, world!
"aa"ryoji@ubuntu:~/hello_world$ 

update rust

ryoji@ubuntu:~$ rustc --version
rustc 1.17.0 (56124baa9 2017-04-24)

ryoji@ubuntu:~$ rustup default stable
info: using existing install for 'stable-x86_64-unknown-linux-gnu'
info: default toolchain set to 'stable-x86_64-unknown-linux-gnu'

  stable-x86_64-unknown-linux-gnu unchanged - rustc 1.17.0 (56124baa9 2017-04-24)

ryoji@ubuntu:~$ 
ryoji@ubuntu:~$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: downloading component 'rustc'
 43.2 MiB /  43.2 MiB (100 %)   4.1 MiB/s ETA:   0 s                
info: downloading component 'rust-std'
 72.2 MiB /  72.2 MiB (100 %)   2.8 MiB/s ETA:   0 s                
info: downloading component 'cargo'
  4.9 MiB /   4.9 MiB (100 %)   4.0 MiB/s ETA:   0 s                
info: downloading component 'rust-docs'
 11.7 MiB /  11.7 MiB (100 %)   3.7 MiB/s ETA:   0 s                
info: downloading component 'rust-src'
 31.9 MiB /  31.9 MiB (100 %)   3.5 MiB/s ETA:   0 s                
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'
info: installing component 'rust-src'
info: checking for self-updates
info: downloading self-update

  stable-x86_64-unknown-linux-gnu updated - rustc 1.18.0 (03fc9d622 2017-06-06)

Rust DT

https://rustdt.github.io/releases/

rustdt.png
eclipsesettings.png

export PATH="$HOME/.cargo/bin:$HOME/.cargo/RustDT/bin:$PATH"

Rust Language Server

https://github.com/rust-lang-nursery/rls

ryoji@ubuntu:~$ rustup update nightly
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2017-06-15, rust version 1.19.0-nightly (554c685b0 2017-06-14)
info: downloading component 'rustc'
 40.3 MiB /  40.3 MiB (100 %)   4.4 MiB/s ETA:   0 s                
info: downloading component 'rust-std'
 58.1 MiB /  58.1 MiB (100 %)   4.3 MiB/s ETA:   0 s                
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'
info: installing component 'rust-docs'

  nightly-x86_64-unknown-linux-gnu installed - rustc 1.19.0-nightly (554c685b0 2017-06-14)

rustup component add rls --toolchain nightly
rustup component add rust-analysis --toolchain nightly
rustup component add rust-src --toolchain nightly
ryoji@ubuntu:~$ rustup run nightly rls

Content-Length: 83

{"jsonrpc": "2.0", "error": {"code": -32700, "message": "Parse error"}, "id": null}

Visual Studio Code https://code.visualstudio.com/docs/?dv=linux64_deb
https://marketplace.visualstudio.com/items?itemName=kalitaalexey.vscode-rust

Ctrl + P
ext install vscode-rust

rustvc.png

settings.png

ryoji@ubuntu:~/hello_iron$ rustup default nightly
info: using existing install for 'nightly-x86_64-unknown-linux-gnu'
info: default toolchain set to 'nightly-x86_64-unknown-linux-gnu'

  nightly-x86_64-unknown-linux-gnu unchanged - rustc 1.19.0-nightly (554c685b0 2017-06-14)

Ctrl + Shift + P


http://qiita.com/skitoy4321/items/0bf6826f948720bed821

{
    "rust.rustLangSrcPath": "/home/ryoji/.multirust/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/src",
    "rust.rls": {
        "executable": "rustup",
        "args": [
            "run",
            "nightly",
            "rls"
        ],
        "revealOutputChannelOn": "info"
    }
}

ctrlshiftp.png

    last modified: 15 June 2017 [ View wiki source Close ]
     
SEARCH DIFFERENCE ATTACHMENT RECENT POST