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

Avoid the use of rustup #34

Closed
webmaster128 opened this issue Apr 4, 2021 · 2 comments · Fixed by #37
Closed

Avoid the use of rustup #34

webmaster128 opened this issue Apr 4, 2021 · 2 comments · Fixed by #37
Assignees

Comments

@webmaster128
Copy link
Member

workspace-optimizer currently uses rustup to install Rust. This is a potential source of friction and in worst case an attack vector as rustup does not error on invalid Rust binary signatures (Switch warnings for errors, ensuring that GPG signatures are always checked and valid.).

If we find a way around the unstable --out-dir we can use the rust installation of the original docker image.

@maurolacy
Copy link
Contributor

By using a shell script (or a shell script wrapper around optimize_workspace.py) I think we can easily avoid the use / need of --out-dir.

@webmaster128
Copy link
Member Author

webmaster128 commented Apr 5, 2021

I'm sure it can be done. It was somewhat hard when I tried last time for various reasons. One is that when calling

docker run --rm -v "$(pwd)":/code \
  --mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
  --mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
  cosmwasm/workspace-optimizer:0.10.9

you will find target/**/*.wasm files from previous builds that are in the cosmwasm-plus_cache volume for some reason. You'd need to remove all of them before the build. If I recall correctly, there were other issues I ran into.

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 a pull request may close this issue.

2 participants