Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smaller docs improvements #2745

Merged
merged 2 commits into from
Mar 18, 2020
Merged

Smaller docs improvements #2745

merged 2 commits into from
Mar 18, 2020

Conversation

tjanez
Copy link
Member

@tjanez tjanez commented Feb 28, 2020

Mostly a clarification on how to set up Rust and take advantage of the newly added rust-toolchain file which rustup uses to download and install the correct version of the Rust toolchain automatically.

Copy link
Contributor

@pro-wh pro-wh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

cc @nhynes who's good at installing rust

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved

```
cargo install fortanix-sgx-tools sgxs-tools
rustup target add x86_64-fortanix-unknown-sgx
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are the rustup target add and cargo install reversed from before?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you only need the target for compiling to sgx. the sgx tools are binaries that compile to native. You'd be best off using rustup target add --toolchain nightly-2020-02-16 x86_64-fortanix-unknown-sgx if you don't set the default toolchain during the initial install.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As @nhynes explained, the Fortanix SGX target is not needed for compiling the sgx tools, however, sgx tools are required for compiling to sgx.

I would like to avoid hard-coding a particular nightly version in the README because experience suggests we will forget to update it.
Hence, I tried to use such instructions that never need to specify a nightly version and only rely on the rust-toolchain file.


```
rustup default nightly
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Copy link
Contributor

@nhynes nhynes Feb 29, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly

if you're feeling terse. one could even go as far as saying --default-toolchain nightly-2020-02-16 -t x86_64-fortanix-unknown-sgx

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestions. I decided to leave it as is as I would prefer not to set the nightly as a default toolchain for all user's projects.

README.md Outdated Show resolved Hide resolved
Clarify instructions on setting up Rust and taking advantage of the newly
added rust-toolchain file which rustup uses to download and install the
correct version of the Rust toolchain automatically.
Currently, Oasis Labs' towncrier fork is unversioned and hence
installing it from a git branch will not over-write a previous
installation, even though there were new changes on the given branch.

For more details, see: oasisprotocol/towncrier#6.
@tjanez tjanez merged commit 40d77ef into master Mar 18, 2020
@tjanez tjanez deleted the tjanez/docs-improvements branch March 18, 2020 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants