-
Notifications
You must be signed in to change notification settings - Fork 134
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
docs: add Trin MacOS setup instructions #1018
Conversation
book/src/developers/quick_setup.md
Outdated
|
||
```sh | ||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs/ | sh -s -- --default-toolchain nightly -y && \ | ||
echo 'export PATH="${HOME}/.cargo/bin:${PATH}"' >> $HOME/.bashrc && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this won't work for users using Zsh instead of Bash since this should be appended to $HOME/.zshrc instead in that case for it to take effect automatically if the user opens another terminal window, otherwise they'd manually have to run source $HOME/.bashrc
. so this would be better in a script that automatically sets it up for macOS users
in any case i now don't believe any of these lines echo 'export ... >> $HOME/.bashrc && \
are required.
instead it just needs source "$HOME/.cargo/env"
to configure the current shell, and for that to be added to the correct configuration file so it is automatically configured in new terminal sessions, because the Rust installation command appends . "$HOME/.cargo/env"
to $HOME/.bashrc instead of also to $HOME/.zshrc even if you're actually using Zsh
we definitely need RUST_LOG
to be set to a value in the environment at the moment, otherwise when you run a node with RUST_LOG= cargo run -- --ephemeral
it results in request timeouts. i think Trin should just use a default value if RUST_LOG
hasn't been set
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Build instructions should be located here https://github.com/ethereum/trin/blob/master/book/src/developers/contributing/build_instructions/mac_os.md
If you want you can link to the build instructions on quick_setup.md
need to use stable rust compiler instead of nightly as mentioned by mike.ferris |
i've pushed changes to address review comments |
echo "Please manually add environment variables to the relevant login shell file" | ||
exit 1 | ||
fi | ||
echo 'export RUST_LOG=debug' >> $LOGIN_SHELL_FILE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setting export RUST_LOG=debug
shouldn't be here. Trin has default logging options, if a user wants to set logging options they can themselves
. $LOGIN_SHELL_FILE | ||
rustup component add rust-src rustfmt clippy | ||
rustup target add wasm32-unknown-unknown | ||
export RUST_STABLE="2023-08-03" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally we don't have instructions which have static dates like this which would need to be updated. Trin should always be compilable on the latest version of rust to my knowledge.
Closing due to lack of communication for 4 months |
No description provided.