-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Rust update to 1.83 #4935
Rust update to 1.83 #4935
Changes from 1 commit
40f3369
6bfe050
fd6bb6f
38f5ead
a9fe92c
1d09f16
12582ac
1010963
46e608c
13a5ad9
536d7e2
f9ed2df
5eb533f
6a9c37b
79257c0
e4f6e5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -76,6 +76,7 @@ RUN apt-get update \ | |
tzdata \ | ||
tini \ | ||
squashfs-tools zstd \ | ||
python3-seccomp \ | ||
# for aws-lc-rs | ||
cmake \ | ||
# for Qemu vhost-user-blk backend | ||
|
@@ -98,8 +99,13 @@ RUN cd /tmp/poetry \ | |
ENV VIRTUAL_ENV=$VENV | ||
ENV PATH=$VENV/bin:$PATH | ||
|
||
# apt-get installs it globally, to manually copy it into the venv | ||
RUN cp /usr/lib/python3/dist-packages/seccomp.cpython-312-"$ARCH"-linux-gnu.so "$VENV"/lib/python3.12/site-packages/ | ||
ShadowCurse marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Running the three as a single dockerfile command to avoid inflation of the image: | ||
# - Install the Rust toolchain. Kani only work on x86, so only try to install it there | ||
# - Install the Rust toolchain. | ||
# - Kani always installs _some_ nightly toolchain, we reuse it for the seccomp filter analysis test. Dynamically | ||
# determine the exact toolchain name, and install more components into it. | ||
# - Build and install crosvm (used as vhost-user-blk backend) | ||
# - Clean up cargo compilation directories | ||
# - Always install both x86_64 and aarch64 musl targets, as our rust-toolchain.toml would force on-the-fly installation of both anyway | ||
|
@@ -110,6 +116,10 @@ RUN curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-too | |
&& cargo install --locked cargo-audit [email protected] grcov cargo-sort cargo-afl \ | ||
&& cargo install --locked kani-verifier && cargo kani setup \ | ||
\ | ||
&& NIGHTLY_TOOLCHAIN=$(rustup toolchain list | grep nightly | tr -d '\n') \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit: I think you don't need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do, otherwise the interpolation of $NIGHTLY_TOOLCHAIN into the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. now that I'm thinking about it, maybe that was in python... |
||
&& rustup component add rust-src --toolchain "$NIGHTLY_TOOLCHAIN" \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why is it needed? any rough estimate how much space it takes? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the static analysis thingy uses -Zbuild_std, to compile the standard library as non-PIE, and for that we need to have the source of the standard library around. Its 28.8MB |
||
&& rustup target add "$ARCH"-unknown-linux-musl --toolchain "$NIGHTLY_TOOLCHAIN" \ | ||
\ | ||
&& apt-get update \ | ||
&& apt-get -y install --no-install-recommends \ | ||
libcap-dev \ | ||
|
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.
"to manually copy" -> "manually copy it so we can use it in the venv"
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.
Ah, yeah, I meant "so manually copy", not "to"