Skip to content

Commit aa6a5fa

Browse files
authored
fix: resolve CI failures for cross-compilation and dependency issues
## Summary - Fixed typos for spell check and lifetime elision warning for doc tests - Updated ring 0.17.13 → 0.17.14 to fix VAES assembly build errors - Switched to cargo-binstall for cross 0.2.5 installation (rustc 1.85.0 compatible) - Used custom BASE_IMAGE arg in Cross.toml to use cross-rs :main Docker images (Ubuntu 20.04+) instead of :0.2.5 (Ubuntu 16.04), fixing protoc proto3 support, libclang version, and missing headers - Pinned mdbook to 0.4.52 for rustc 1.85.0 compatibility 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 5c75842 commit aa6a5fa

File tree

9 files changed

+43
-24
lines changed

9 files changed

+43
-24
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- uses: actions/checkout@v4
3232
- uses: actions-rust-lang/setup-rust-toolchain@v1
3333
- name: install mermaid preprocessor
34-
run: cargo install mdbook mdbook-mermaid
34+
run: cargo install mdbook --version 0.4.52 && cargo install mdbook-mermaid --version 0.16.0
3535
- name: Build mdbook
3636
working-directory: ./docs
3737
run: mdbook build

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cross.toml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
[build]
22
default-target = "x86_64-unknown-linux-musl"
33

4-
[target.aarch64-unknown-linux-musl]
5-
dockerfile = "cross/Dockerfile.musl"
4+
[target.aarch64-unknown-linux-musl.dockerfile]
5+
file = "cross/Dockerfile.musl"
6+
build-args = { BASE_IMAGE = "ghcr.io/cross-rs/aarch64-unknown-linux-musl:main", CROSS_CMAKE_SYSTEM_PROCESSOR = "aarch64", CROSS_SYSROOT = "/usr/local/aarch64-linux-musl" }
67

7-
[target.x86_64-unknown-linux-musl]
8-
dockerfile = "cross/Dockerfile.musl"
8+
[target.x86_64-unknown-linux-musl.dockerfile]
9+
file = "cross/Dockerfile.musl"
10+
build-args = { BASE_IMAGE = "ghcr.io/cross-rs/x86_64-unknown-linux-musl:main", CROSS_CMAKE_SYSTEM_PROCESSOR = "x86_64", CROSS_SYSROOT = "/usr/local/x86_64-linux-musl" }
911

10-
[target.aarch64-unknown-linux-gnu]
11-
dockerfile = "cross/Dockerfile.gnu"
12+
[target.aarch64-unknown-linux-gnu.dockerfile]
13+
file = "cross/Dockerfile.gnu"
14+
build-args = { BASE_IMAGE = "ghcr.io/cross-rs/aarch64-unknown-linux-gnu:main" }
1215

13-
[target.x86_64-unknown-linux-gnu]
14-
dockerfile = "cross/Dockerfile.gnu"
16+
[target.x86_64-unknown-linux-gnu.dockerfile]
17+
file = "cross/Dockerfile.gnu"
18+
build-args = { BASE_IMAGE = "ghcr.io/cross-rs/x86_64-unknown-linux-gnu:main" }

crates/containerd-shim-wasm/src/sandbox/context.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ pub trait RuntimeContext: Send + Sync {
3131
/// "/app/app.wasm#entry" -> { source: File("/app/app.wasm"), func: "entry", name: "Some(app)", arg0: "/app/app.wasm#entry" }
3232
/// "my_module.wat" -> { source: File("my_module.wat"), func: "_start", name: "Some(my_module)", arg0: "my_module.wat" }
3333
/// "#init" -> { source: File(""), func: "init", name: None, arg0: "#init" }
34-
fn entrypoint(&self) -> Entrypoint;
34+
fn entrypoint(&self) -> Entrypoint<'_>;
3535
}
3636

3737
/// The source for a WASI module / components.
@@ -111,7 +111,7 @@ impl RuntimeContext for WasiContext<'_> {
111111
.unwrap_or_default()
112112
}
113113

114-
fn entrypoint(&self) -> Entrypoint {
114+
fn entrypoint(&self) -> Entrypoint<'_> {
115115
let arg0 = self.args().first();
116116

117117
let entry_point = arg0.map(String::as_str).unwrap_or("");

crates/containerd-shim-wasmtime/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ upon receiving a terminate or interrupt signal in the container.
2727

2828
This can be very useful on the Wasm-first platforms to allow instance-per-request isolation:
2929

30-
> Eeach Wasm instance serves only one HTTP request, and then goes away. This is fantastic for security and bug
30+
> Each Wasm instance serves only one HTTP request, and then goes away. This is fantastic for security and bug
3131
> mitigation: the blast radius of an exploit or guest-runtime bug is only a single request, and can never see the data
3232
> from other users of the platform or even other requests by the same user. [3]
3333

cross/Dockerfile.gnu

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
ARG CROSS_BASE_IMAGE
1+
ARG BASE_IMAGE
22
ARG CROSS_DEB_ARCH
3-
FROM $CROSS_BASE_IMAGE
3+
FROM ${BASE_IMAGE}
44

55
ARG CROSS_DEB_ARCH
66
RUN dpkg --add-architecture ${CROSS_DEB_ARCH} && \
77
apt-get -y update && \
8-
apt-get install -y pkg-config protobuf-compiler libseccomp-dev:${CROSS_DEB_ARCH} libzstd-dev:${CROSS_DEB_ARCH} libssl-dev
8+
apt-get install -y pkg-config protobuf-compiler libseccomp-dev:${CROSS_DEB_ARCH} libzstd-dev:${CROSS_DEB_ARCH} libssl-dev libclang-dev

cross/Dockerfile.musl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1-
ARG CROSS_BASE_IMAGE
2-
FROM $CROSS_BASE_IMAGE
1+
ARG BASE_IMAGE
2+
FROM ${BASE_IMAGE}
3+
4+
ARG CROSS_CMAKE_SYSTEM_PROCESSOR
5+
ARG CROSS_SYSROOT
36

47
COPY --from=jorgeprendes420/apk-anywhere / /
58
ENV MARCH=${CROSS_CMAKE_SYSTEM_PROCESSOR}
@@ -25,4 +28,4 @@ rustflags = ["-Clink-arg=-lgcc"]
2528
EOF
2629

2730
RUN apt-get -y update && \
28-
apt-get install -y pkg-config protobuf-compiler
31+
apt-get install -y pkg-config protobuf-compiler libclang-dev

docs/src/benchmarks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,6 @@ We use [benchmark-action](https://github.com/benchmark-action/github-action-benc
8585

8686
If you want to contribute to the benchmarks, whether it's adding a new benchmark or improving the existing ones, or just want to share your ideas, please refer to the following issue:
8787

88-
- [Bencharking issue #97](https://github.com/containerd/runwasi/issues/97)
88+
- [Benchmarking issue #97](https://github.com/containerd/runwasi/issues/97)
8989

9090
Any PRs are welcome!

scripts/setup-cross.sh

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
#!/bin/bash
2-
cargo install cross --git https://github.com/cross-rs/cross
2+
# Use cargo-binstall to install cross from pre-built binaries
3+
# This avoids the dependency resolution issue where cargo install
4+
# resolves dependencies to latest versions that require rustc 1.88+
5+
6+
# Install cargo-binstall if not already installed
7+
if ! command -v cargo-binstall &> /dev/null; then
8+
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
9+
fi
10+
11+
# Install cross using cargo-binstall (downloads pre-built binary)
12+
# Use --force to ensure the binary is actually present even if metadata
13+
# says it's already installed (the Rust cache may have cleaned the binary)
14+
cargo binstall cross --version 0.2.5 --no-confirm --force
315

416
if [ ! -z "$CI" ]; then
517

0 commit comments

Comments
 (0)