Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: install mermaid preprocessor
run: cargo install mdbook mdbook-mermaid
run: cargo install mdbook --version 0.4.52 && cargo install mdbook-mermaid --version 0.16.0
- name: Build mdbook
working-directory: ./docs
run: mdbook build
Expand Down
18 changes: 10 additions & 8 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
[build]
default-target = "x86_64-unknown-linux-musl"

[target.aarch64-unknown-linux-musl]
dockerfile = "cross/Dockerfile.musl"
[target.aarch64-unknown-linux-musl.dockerfile]
file = "cross/Dockerfile.musl"
build-args = { CROSS_CMAKE_SYSTEM_PROCESSOR = "aarch64", CROSS_SYSROOT = "/usr/local/aarch64-linux-musl" }

[target.x86_64-unknown-linux-musl]
dockerfile = "cross/Dockerfile.musl"
[target.x86_64-unknown-linux-musl.dockerfile]
file = "cross/Dockerfile.musl"
build-args = { CROSS_CMAKE_SYSTEM_PROCESSOR = "x86_64", CROSS_SYSROOT = "/usr/local/x86_64-linux-musl" }

[target.aarch64-unknown-linux-gnu]
dockerfile = "cross/Dockerfile.gnu"
[target.aarch64-unknown-linux-gnu.dockerfile]
file = "cross/Dockerfile.gnu"

[target.x86_64-unknown-linux-gnu]
dockerfile = "cross/Dockerfile.gnu"
[target.x86_64-unknown-linux-gnu.dockerfile]
file = "cross/Dockerfile.gnu"
4 changes: 2 additions & 2 deletions crates/containerd-shim-wasm/src/sandbox/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub trait RuntimeContext: Send + Sync {
/// "/app/app.wasm#entry" -> { source: File("/app/app.wasm"), func: "entry", name: "Some(app)", arg0: "/app/app.wasm#entry" }
/// "my_module.wat" -> { source: File("my_module.wat"), func: "_start", name: "Some(my_module)", arg0: "my_module.wat" }
/// "#init" -> { source: File(""), func: "init", name: None, arg0: "#init" }
fn entrypoint(&self) -> Entrypoint;
fn entrypoint(&self) -> Entrypoint<'_>;
}

/// The source for a WASI module / components.
Expand Down Expand Up @@ -111,7 +111,7 @@ impl RuntimeContext for WasiContext<'_> {
.unwrap_or_default()
}

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

let entry_point = arg0.map(String::as_str).unwrap_or("");
Expand Down
2 changes: 1 addition & 1 deletion crates/containerd-shim-wasmtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ upon receiving a terminate or interrupt signal in the container.

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

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

Expand Down
3 changes: 3 additions & 0 deletions cross/Dockerfile.musl
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
ARG CROSS_BASE_IMAGE
FROM $CROSS_BASE_IMAGE

ARG CROSS_CMAKE_SYSTEM_PROCESSOR
ARG CROSS_SYSROOT

COPY --from=jorgeprendes420/apk-anywhere / /
ENV MARCH=${CROSS_CMAKE_SYSTEM_PROCESSOR}
RUN apk-init ${MARCH} ${CROSS_SYSROOT}
Expand Down
2 changes: 1 addition & 1 deletion docs/src/benchmarks.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ We use [benchmark-action](https://github.com/benchmark-action/github-action-benc

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:

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

Any PRs are welcome!
12 changes: 11 additions & 1 deletion scripts/setup-cross.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
#!/bin/bash
cargo install cross --git https://github.com/cross-rs/cross
# Use cargo-binstall to install cross from pre-built binaries
# This avoids the dependency resolution issue where cargo install
# resolves dependencies to latest versions that require rustc 1.88+

# Install cargo-binstall if not already installed
if ! command -v cargo-binstall &> /dev/null; then
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
fi

# Install cross using cargo-binstall (downloads pre-built binary)
cargo binstall cross --version 0.2.5 --no-confirm

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

Expand Down
Loading