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

docs: add Trin MacOS setup instructions #1018

Closed
wants to merge 3 commits into from

Conversation

ltfschoen
Copy link
Contributor

No description provided.


```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 && \
Copy link
Contributor Author

@ltfschoen ltfschoen Nov 1, 2023

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

Copy link
Member

@KolbyML KolbyML left a 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

@ltfschoen
Copy link
Contributor Author

need to use stable rust compiler instead of nightly as mentioned by mike.ferris

@ltfschoen
Copy link
Contributor Author

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

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
Copy link
Member

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"
Copy link
Member

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.

@KolbyML
Copy link
Member

KolbyML commented Mar 9, 2024

Closing due to lack of communication for 4 months

@KolbyML KolbyML closed this Mar 9, 2024
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.

2 participants