-
Notifications
You must be signed in to change notification settings - Fork 16
added dynamic install of rust toolchain based on host arch and OS #275
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
added dynamic install of rust toolchain based on host arch and OS #275
Conversation
dfd0efd to
dd27240
Compare
AnotherDaniel
left a comment
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.
Good stuff, thank you!
I've added one thought wrt the MacOS workaround that I've originally added...
.devcontainer/scripts/post-create.sh
Outdated
|
|
||
| #region sudo stuff | ||
|
|
||
| # This is a workaround which is againt necessary on MacOS 14.0, it looks like this bug is back: |
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.
I haven't looked into details at all, and didn't test-run this myself, yet, but: if we now know our $ARCH_AND_OS, might it make sense to only run this workaround section when on MacOS? Could that be done? ...
I'll be able to actually test maybe later today, latest early next week.
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.
I updated the script and wrapped the Mac workaround stuff with what I think is a Mac OS check (based on google searching)
AnotherDaniel
left a comment
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.
Tested on my Machine (Mac), looking good!
…ty (#30) Dynamic install of rust toolchain based on host arch and OS (as has been done in eclipse-uprotocol/up-rust#275) * dynamic install of rust toolchain based on host arch and OS * wrap mac workaround script in OS check
The previous installation of the rust toolchain was done inside the
Dockerfile. Docker has no knowledge of the host architecture and OS while it is building containers. Therefore, I moved the installation outside of theDockerfileand into the a bash function that is called in thepost-create.shscript.If using the Dev Containers extension in VS Code, the
post-create.shscript is ran immediately after the container is created by VS Code, and installs the rust toolchain for your current hosts architecture and OS. It also adds the architecture and OS as a rust build targetFor example, I am running WSL with an x86-64 architecture so it performed the following actions immediately after the Docker container built
rustup target add x86_64-unknown-linux-gnurustup toolchain install stable-x86_64-unknown-linux-gnuI believe this is further proof the install succeeded as I was able to run all unit tests for this repo
