-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Install and prepare Miri in the primary container
The other tools exist in all channels and Miri is the odd one out, so we make it look a bit more odd.
- Loading branch information
1 parent
f14e3a8
commit aee946b
Showing
3 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eu | ||
|
||
export MIRI_SYSROOT=~/.cache/miri | ||
export MIRIFLAGS="-Zmiri-disable-isolation" | ||
exec cargo miri run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,6 @@ | ||
ARG base_image=shepmaster/rust-nightly | ||
FROM ${base_image} | ||
|
||
RUN rustup component add rust-src miri | ||
|
||
RUN echo 'fn main() {}' > src/main.rs | ||
RUN cargo miri setup | ||
RUN cargo miri run | ||
RUN rm src/*.rs | ||
|
||
ADD --chown=playground cargo-miri-playground /playground/.cargo/bin | ||
# The base image takes care of all this for now | ||
|
||
ENTRYPOINT ["/playground/tools/entrypoint.sh"] |