diff --git a/images/Dockerfile b/images/Dockerfile index a3eda56..301e8b8 100644 --- a/images/Dockerfile +++ b/images/Dockerfile @@ -4,7 +4,7 @@ # # bench Rust stable, valgrind, iai-callgrind-runner, python3, gh # fuzz Rust nightly, cargo-fuzz, gh -# wasm Rust stable + wasm32, wasm-bindgen, wasm-pack, binaryen +# wasm Rust stable + wasm32 (browser and WASI), wasm-bindgen, wasm-pack, binaryen # tools Rust stable + musl, cue, cbindgen, musl-tools, make, jq # # docker build --target bench images @@ -211,13 +211,16 @@ RUN cargo install --locked --root /out --version "$CARGO_FUZZ_VERSION" cargo-fuz FROM fuzz-rust AS fuzz ARG RUST_NIGHTLY +# python3: the Observatory report-fuzz action, run inside this container. +RUN --mount=type=bind,source=apt-install.sh,target=/apt-install.sh \ + sh /apt-install.sh python3 COPY --from=fuzz-cargo /out/bin/ /usr/local/bin/ COPY --from=dl-gh /out/ /usr/local/bin/ ENV CI_RUST_NIGHTLY=${RUST_NIGHTLY} ARG REVISION=unknown LABEL org.opencontainers.image.source="https://github.com/ComlineProject/ci-images" \ org.opencontainers.image.revision="${REVISION}" \ - org.opencontainers.image.description="ComlineProject CI: Rust nightly and cargo-fuzz for the fuzz jobs (see images/versions.md)" + org.opencontainers.image.description="ComlineProject CI: Rust nightly, cargo-fuzz and python3 for the fuzz jobs (see images/versions.md)" # --------------------------------------------------------------------------- @@ -230,13 +233,13 @@ RUN --mount=type=bind,source=apt-install.sh,target=/apt-install.sh \ RUN --mount=type=bind,source=arch.sh,target=/arch.sh \ --mount=type=bind,source=rustup.sh,target=/rustup.sh \ --mount=type=bind,from=dl-rustup,source=/out,target=/dl \ - sh /rustup.sh "$RUST_STABLE" stable -t wasm32-unknown-unknown + sh /rustup.sh "$RUST_STABLE" stable -t wasm32-unknown-unknown -t wasm32-wasip1 COPY --from=dl-wasm /out/ /usr/local/bin/ ENV CI_RUST_STABLE=${RUST_STABLE} ARG REVISION=unknown LABEL org.opencontainers.image.source="https://github.com/ComlineProject/ci-images" \ org.opencontainers.image.revision="${REVISION}" \ - org.opencontainers.image.description="ComlineProject CI: Rust stable with wasm32, wasm-bindgen, wasm-pack and binaryen (see images/versions.md)" + org.opencontainers.image.description="ComlineProject CI: Rust stable with wasm32 (unknown and wasip1), wasm-bindgen, wasm-pack and binaryen (see images/versions.md)" # --------------------------------------------------------------------------- diff --git a/images/smoke.sh b/images/smoke.sh index 9839623..d76c26c 100755 --- a/images/smoke.sh +++ b/images/smoke.sh @@ -62,7 +62,8 @@ fuzz) run cargo "+$CI_RUST_NIGHTLY" fuzz --version run cargo fuzz --version run gh --version - absent valgrind python3 wasm-pack cue cbindgen + run python3 --version + absent valgrind wasm-pack cue cbindgen # What cargo-fuzz asks of the compiler: a sanitizer runtime in the toolchain. work=$(mktemp -d); cd "$work" run cargo new --quiet --vcs none hello @@ -73,13 +74,14 @@ wasm) echo "== wasm" [[ "$(rustc --version)" == "rustc $CI_RUST_STABLE "* ]] || fail "default rustc is not $CI_RUST_STABLE" installed_target wasm32-unknown-unknown + installed_target wasm32-wasip1 run wasm-bindgen --version run wasm-pack --version run wasm-opt --version command -v wasm-bindgen-test-runner wasm2es6js run jq --version absent valgrind cargo-fuzz cue cbindgen gh - builds "" wasm32-unknown-unknown + builds "" wasm32-unknown-unknown wasm32-wasip1 ;; tools) echo "== tools" diff --git a/images/versions.md b/images/versions.md index aec5947..6d7abc5 100644 --- a/images/versions.md +++ b/images/versions.md @@ -9,8 +9,8 @@ specification. Why Debian: [`../docs/base-choice.md`](../docs/base-choice.md). | Image | Jobs | Rust | Also in it | |---|---|---|---| | `ci-bench` | the instruction-count benchmarks (core, runtime) | stable 1.99.1, minimal | valgrind, iai-callgrind-runner 0.16.1, python3, gh | -| `ci-fuzz` | the cargo-fuzz jobs (core, runtime) | nightly-2026-11-10, minimal | cargo-fuzz 0.13.2, gh | -| `ci-wasm` | the WebAssembly build (simulator, playground) | stable 1.99.1, minimal, `wasm32-unknown-unknown` | wasm-bindgen 0.2.127, wasm-pack 0.15.1, binaryen, jq | +| `ci-fuzz` | the cargo-fuzz jobs (core, runtime) | nightly-2026-11-10, minimal | cargo-fuzz 0.13.2, gh, python3 (the Observatory `report-fuzz` action) | +| `ci-wasm` | the WebAssembly build (simulator, playground), core's `ir_only` job | stable 1.99.1, minimal, `wasm32-unknown-unknown`, `wasm32-wasip1` | wasm-bindgen 0.2.127, wasm-pack 0.15.1, binaryen, jq | | `ci-tools` | cue, cbindgen and the musl build (runtime, specification) | stable 1.99.1, minimal, the musl target | cue v0.17.1, cbindgen 0.29.2, musl-tools, make, jq | All four have, from the base: git, ca-certificates, zstd (for `actions/cache`), @@ -34,7 +34,7 @@ python3 3.13.5, git 2.47.3. The smoke test prints the rest. | stable toolchain | 1.99.1 | Current stable when the images were built (2026-11-12). Default toolchain, also reachable as `stable`, in `ci-bench`, `ci-wasm`, `ci-tools`. No components: `clippy`, `rustfmt`, `llvm-tools-preview` are not in these images (a job that needs one runs `rustup component add`, or a `rust-toolchain.toml` that names it does). runtime's `rust-toolchain.toml` pins 1.98.0 and core's says `stable`: bump runtime's to match, or it downloads 1.98.0 at job time. | | nightly toolchain | nightly-2026-11-10 | cargo-fuzz needs nightly (core and runtime `fuzz.yml`). Dated, so the image does not move under the jobs; default in `ci-fuzz`, also reachable as `nightly`. No components: `cargo fuzz build` and `run` need only the sanitizer runtime that comes with the toolchain's `rust-std`, not `rust-src` or `llvm-tools-preview` (those are for `cargo fuzz coverage` and `--build-std`). `stable` is not in `ci-fuzz`. | | beta, 1.82.0, miri | not included | Moving or one-off toolchains (the `beta` leg of the toolchain matrix, specification's MSRV check, runtime's `ffi_miri` job) are installed by the job: `rustup toolchain install beta --profile minimal`. | -| targets | `wasm32-unknown-unknown` in `ci-wasm`; `x86_64-unknown-linux-musl` (`aarch64-...` on arm64) in `ci-tools` | `wasm32-wasip1` is not included (no job uses it). | +| targets | `wasm32-unknown-unknown` and `wasm32-wasip1` in `ci-wasm`; `x86_64-unknown-linux-musl` (`aarch64-...` on arm64) in `ci-tools` | `wasm32-unknown-unknown` is the browser build (simulator, playground). `wasm32-wasip1` is for core's `ir_only` job (`build_test.yml`), which runs `cargo build -p comline-core --no-default-features --target wasm32-wasip1` (and the same for `wasm32-unknown-unknown`): the IR without a parser must compile for WASI. Both are `rust-std` only, no runtime (wasmtime, wasmer) is in the image, so it builds for WASI but cannot run the result. | ## Tools