diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index efcac997..afacb33a 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -29,7 +29,7 @@ jobs: strategy: matrix: # for now, limit this a bit - revision: ["main", "v25.0.0"] + revision: ["main", "v38.0.3"] env: REVISION: ${{ matrix.revision }} steps: @@ -76,7 +76,7 @@ jobs: run: | cargo run benchmark \ --engine=artifacts/wasmtime-main/libengine.so \ - --engine=artifacts/wasmtime-v25.0.0/libengine.so \ + --engine=artifacts/wasmtime-v38.0.3/libengine.so \ --processes=4 \ --iterations-per-process=1 \ -- "${PARTITION_SUITE}" diff --git a/.github/workflows/sightglass.yml b/.github/workflows/sightglass.yml index bf5ec114..39624382 100644 --- a/.github/workflows/sightglass.yml +++ b/.github/workflows/sightglass.yml @@ -11,9 +11,7 @@ env: CARGO_TERM_COLOR: always RUST_LOG: info - # The Wasmtime commit that we build the bench API from for testing. Bumping - # this will automatically cause us to update our CI cache on the next run. - WASMTIME_COMMIT: "a2e71dafac4d2e42ed6edbc77081d39a40f4c3ff" + REVISION: "v38.0.3" jobs: format: @@ -33,23 +31,27 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] steps: - uses: actions/checkout@v4 - - run: rustup update nightly + - run: rustup update - name: Download Cached Wasmtime engine uses: actions/cache@v4 id: wasmtime-cache with: path: engines/wasmtime/* - key: wasmtime-${{ runner.os }}-${{ env.WASMTIME_COMMIT }} + key: wasmtime-${{ runner.os }}-${{ env.REVISION }} - name: Build Wasmtime engine if: steps.wasmtime-cache.outputs.cache-hit != 'true' working-directory: ./engines/wasmtime + env: + REVISION: ${{ env.REVISION }} run: | rustc build.rs ./build - name: Build all - run: cargo +nightly build --verbose --all + run: cargo build --verbose --all - name: Test all - run: cargo +nightly test --verbose --all + run: cargo test --verbose --all + env: + RUST_BACKTRACE: 1 diff --git a/Cargo.lock b/Cargo.lock index 9e324301..60efe486 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1116,14 +1116,12 @@ checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" [[package]] name = "precision" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbc84fc8369453e02d82fe292dc9b03151c80a36716718c0dcc1ff0fe4029a63" +version = "0.1.18" +source = "git+https://github.com/posborne/rust-precision.git?branch=target-stable-asm#f9d7fb3b7d85216f5a9e0b39812cb0a16d60a9cf" dependencies = [ "cc", "libc", - "rustc_version", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasix", "wasm-bindgen", ] @@ -1389,15 +1387,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - [[package]] name = "ryu" version = "1.0.9" @@ -1443,12 +1432,6 @@ dependencies = [ "libc", ] -[[package]] -name = "semver" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" - [[package]] name = "serde" version = "1.0.136" @@ -1984,6 +1967,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasix" +version = "0.12.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1fbb4ef9bbca0c1170e0b00dd28abc9e3b68669821600cad1caaed606583c6d" +dependencies = [ + "wasi 0.11.0+wasi-snapshot-preview1", +] + [[package]] name = "wasm-bindgen" version = "0.2.82" diff --git a/benchmarks/libsodium/Dockerfile b/benchmarks/libsodium/Dockerfile index dd5708c9..1a1255a7 100644 --- a/benchmarks/libsodium/Dockerfile +++ b/benchmarks/libsodium/Dockerfile @@ -9,9 +9,9 @@ RUN wget https://ziglang.org/download/0.12.0/zig-linux-x86_64-0.12.0.tar.xz RUN tar --extract --verbose --file=zig-linux-x86_64-0.12.0.tar.xz ENV PATH="${PATH}:/zig-linux-x86_64-0.12.0" RUN echo "zig version = $(zig version)" -RUN wget https://github.com/jedisct1/libsodium/archive/stable.zip -RUN unzip stable.zip -RUN mv /libsodium-stable /libsodium +RUN wget https://github.com/jedisct1/libsodium/releases/download/1.0.20-RELEASE/libsodium-1.0.20.tar.gz +RUN tar -xzf libsodium-1.0.20.tar.gz +RUN mv /libsodium-1.0.20 /libsodium # Build the benchmarks. Note how we patch the self-timing code with calls to the # Sightglass `bench_start()` and `bench_end()` functions. Also note that each diff --git a/crates/cli/src/benchmark.rs b/crates/cli/src/benchmark.rs index acefafea..85e563c8 100644 --- a/crates/cli/src/benchmark.rs +++ b/crates/cli/src/benchmark.rs @@ -398,7 +398,10 @@ impl BenchmarkCommand { anyhow::ensure!( output.status.success(), - "benchmark subprocess did not exit successfully" + "benchmark subprocess did not exit successfully: {}\nstderr: {}\nstdout: {}", + output.status, + String::from_utf8_lossy(&output.stderr), + String::from_utf8_lossy(&output.stdout) ); eprintln!("."); diff --git a/crates/recorder/Cargo.toml b/crates/recorder/Cargo.toml index 936e4f21..2f0106f1 100644 --- a/crates/recorder/Cargo.toml +++ b/crates/recorder/Cargo.toml @@ -9,7 +9,7 @@ edition = "2021" anyhow = "1.0" libloading = "0.7" log = "0.4" -precision = "0.1.15" +precision = { git = "https://github.com/posborne/rust-precision.git", branch = "target-stable-asm" } serde = { version = "1.0.118", features = ["derive"] } sightglass-build = { path = "../build" } sightglass-data = { path = "../data" }