Skip to content

Instantly share code, notes, and snippets.

@ritiek

ritiek/devenv.sh

Last active Jan 27, 2018
Embed
What would you like to do?
Setup rust-lang local development environment
# git clone https://github.com/rust-lang/rust
# cd rust
# <make changes to source if any>
# full build (1st time)
./x.py install
rustup toolchain link develop build/x86_64-unknown-linux-gnu/stage2
rustup default develop
rustc -V
# <make changes to source if any>
# stage 1 build (every incremental compile, faster build)
# ./x.py build --stage 1
# rustup toolchain link develop build/x86_64-unknown-linux-gnu/stage1
# rustup default develop
# <run tests related to change>
# directory test suite
# ./x.py test src/test/<directory>
# <make sure all tests pass before making PR>
# full test suite
# ./x.py test
# To complile with AST optimizations:
# rustc </path/to/source.rs>
# To compile with NLL optimizations:
# rustc -Znll </path/to/source.rs>
# To compile with MIR optimizations:
# rustc -Zborrowck-mir </path/to/source.rs>
# To compile using cargo:
# cargo rustc -- -Znll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment