Skip to content

Commit ce354ed

Browse files
committed
Add support for both wasmtime latest (39.x) and LTS (36.x) versions
Introduces wasmtime_lts feature flag to switch between wasmtime versions. Default uses latest (39.0.1), pass --lts flag to AOT compiler or enable wasmtime_lts feature for LTS version (36.0.3). CI updated to test both. Signed-off-by: James Sturtevant <jsturtevant@gmail.com>
1 parent fef0205 commit ce354ed

24 files changed

Lines changed: 1242 additions & 485 deletions

.github/workflows/Benchmarks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ jobs:
4747

4848
- uses: hyperlight-dev/ci-setup-workflow@v1.8.0
4949
with:
50-
rust-toolchain: "1.89"
50+
rust-toolchain: "1.93"
5151

52-
- uses: dtolnay/rust-toolchain@1.89
52+
- uses: dtolnay/rust-toolchain@1.93
5353
with:
5454
components: clippy, rustfmt
5555

5656
- name: Download Wasm Modules
5757
uses: actions/download-artifact@v5
5858
with:
59-
name: guest-modules
59+
name: guest-modules-lts
6060
path: ./x64/${{ matrix.config }}
6161

6262
### Benchmarks ###

.github/workflows/CargoAudit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
# We are not using the common workflow here because it installs a lot of tools we don't need
1919
uses: dtolnay/rust-toolchain@master
2020
with:
21-
toolchain: "1.89"
21+
toolchain: "1.93"
2222

2323
- uses: extractions/setup-just@v3
2424
with:

.github/workflows/CreateDevcontainerImage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ env:
1616
USER: vscode
1717
GROUP: vscode
1818
LLVM_VERSION: 17
19-
RUST_TOOLCHAIN_DEFAULT: 1.89
19+
RUST_TOOLCHAIN_DEFAULT: 1.93
2020
RUST_TOOLCHAIN_FILE: rust-toolchain.toml
2121
WASI_SDK_VERSION_FULL: "25.0"
2222
GCC_VERSION: "12"

.github/workflows/CreateRelease.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Hyperlight setup
3939
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
4040
with:
41-
rust-toolchain: "1.89"
41+
rust-toolchain: "1.93"
4242
- name: Set HYPERLIGHTWASM_VERSION
4343
run: |
4444
git fetch --tags
@@ -50,7 +50,7 @@ jobs:
5050
- name: Download Wasm Modules
5151
uses: actions/download-artifact@v5
5252
with:
53-
name: guest-modules
53+
name: guest-modules-lts
5454
path: ${{ env.PLATFORM }}/${{ env.CONFIG }}
5555
- name: Build rust wasm modules
5656
run: just build-rust-wasm-examples ${{ env.CONFIG }}
@@ -105,7 +105,7 @@ jobs:
105105
echo "✅ $crate@$version already published, skipping."
106106
else
107107
echo "🚀 Publishing $crate@$version"
108-
cargo +1.92 publish -p "$crate"
108+
cargo +1.93 publish -p "$crate"
109109
fi
110110
}
111111

.github/workflows/dep_build_wasm_examples.yml

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,13 @@ permissions:
2121
contents: read
2222

2323
jobs:
24-
build-wasm-examples:
24+
build-docker-image:
2525
if: ${{ inputs.docs_only == 'false' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v5
2929
with:
3030
fetch-depth: 0
31-
- name: Remove default clang
32-
run: sudo rm /usr/bin/clang
33-
- name: Hyperlight setup workflow
34-
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
35-
with:
36-
rust-toolchain: "1.89"
3731
- name: Set up Docker Buildx
3832
uses: docker/setup-buildx-action@v3
3933
- name: Login to Registry
@@ -76,14 +70,46 @@ jobs:
7670
tags: ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest
7771
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:buildcache
7872
cache-to: ${{ env.CACHE_TO }}
79-
- name: Build Modules
73+
74+
build-wasm-examples:
75+
needs: build-docker-image
76+
runs-on: ubuntu-latest
77+
strategy:
78+
matrix:
79+
wasmtime_version:
80+
- name: lts
81+
features: ""
82+
- name: latest
83+
features: "wasmtime_latest"
84+
steps:
85+
- uses: actions/checkout@v5
86+
with:
87+
fetch-depth: 0
88+
- name: Remove default clang
89+
run: sudo rm /usr/bin/clang
90+
- name: Hyperlight setup workflow
91+
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
92+
with:
93+
rust-toolchain: "1.93"
94+
- name: Set up Docker Buildx
95+
uses: docker/setup-buildx-action@v3
96+
- name: Login to Registry
97+
uses: docker/login-action@v3
98+
with:
99+
registry: ghcr.io
100+
username: ${{ github.actor }}
101+
password: ${{ secrets.GITHUB_TOKEN }}
102+
- name: Pull wasm-clang-builder
103+
run: |
104+
docker pull ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest
105+
- name: Build Modules (wasmtime ${{ matrix.wasmtime_version.name }})
80106
run: |
81107
just ensure-tools
82-
just build-wasm-examples release
108+
just build-wasm-examples release ${{ matrix.wasmtime_version.features }}
83109
shell: bash
84-
- name: Upload Wasm Modules
110+
- name: Upload Wasm Modules (wasmtime ${{ matrix.wasmtime_version.name }})
85111
uses: actions/upload-artifact@v4
86112
with:
87-
name: guest-modules
113+
name: guest-modules-${{ matrix.wasmtime_version.name }}
88114
path: |
89115
x64/release/*.aot

.github/workflows/dep_cargo_publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Hyperlight setup
2323
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
2424
with:
25-
rust-toolchain: "1.89"
25+
rust-toolchain: "1.93"
2626

2727
# github actions that run against PRs check out a ref to the PR merge branch
2828
# we need to switch / create a branch for cargo ws to run late

.github/workflows/dep_rust.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ jobs:
4040
hypervisor: [hyperv, mshv3, kvm] # hyperv is windows, mshv and kvm are linux
4141
cpu: [amd, intel]
4242
config: [debug, release]
43+
wasmtime: [latest, lts]
44+
exclude:
45+
# Latest testing: skip Windows, Intel, and debug builds to reduce CI load
46+
- wasmtime: latest
47+
hypervisor: hyperv
48+
- wasmtime: latest
49+
cpu: intel
50+
- wasmtime: latest
51+
config: debug
4352

4453
runs-on: ${{ fromJson(
4554
format('["self-hosted", "{0}", "X64", "1ES.Pool=hld-{1}-{2}", "JobId=build-{3}-{4}-{5}-{6}"]',
@@ -50,13 +59,20 @@ jobs:
5059
github.run_id,
5160
github.run_number,
5261
github.run_attempt)) }}
62+
env:
63+
# Features to pass to cargo.
64+
# On Windows LTS builds, do not pass any features.
65+
# On Windows latest builds, only add wasmtime_latest.
66+
# On Linux, always pass the hypervisor feature (kvm/mshv3).
67+
# On Linux latest builds, also add wasmtime_latest.
68+
FEATURES: ${{ matrix.hypervisor != 'hyperv' && format('{0}{1}', matrix.hypervisor, matrix.wasmtime == 'latest' && ',wasmtime_latest' || '') || (matrix.wasmtime == 'latest' && 'wasmtime_latest' || '') }}
5369
steps:
5470
- uses: actions/checkout@v5
5571

5672
- name: Hyperlight setup
5773
uses: hyperlight-dev/ci-setup-workflow@v1.8.0
5874
with:
59-
rust-toolchain: "1.89"
75+
rust-toolchain: "1.93"
6076

6177
- name: Add Nightly Rust
6278
run: |
@@ -74,7 +90,7 @@ jobs:
7490
- name: Download Wasm Modules
7591
uses: actions/download-artifact@v5
7692
with:
77-
name: guest-modules
93+
name: guest-modules-${{ matrix.wasmtime }}
7894
path: ./x64/${{ matrix.config }}
7995

8096
- name: Build Rust component model examples
@@ -83,7 +99,7 @@ jobs:
8399
# because the component model example depends on the wasm component built here
84100
just ensure-tools
85101
just compile-wit
86-
just build-rust-component-examples ${{ matrix.config }}
102+
just build-rust-component-examples ${{ matrix.config }} ${{ matrix.wasmtime == 'latest' && 'wasmtime_latest' || '' }}
87103
88104
- name: Fmt
89105
run: just fmt-check
@@ -92,15 +108,15 @@ jobs:
92108
run: just clippy ${{ matrix.config }}
93109

94110
- name: Build
95-
run: just build ${{ matrix.config }}
111+
run: just build ${{ matrix.config }} ${{ env.FEATURES }}
96112
working-directory: ./src/hyperlight_wasm
97113

98114
- name: Build Rust Wasm examples
99-
run: just build-rust-wasm-examples ${{ matrix.config }}
115+
run: just build-rust-wasm-examples ${{ matrix.config }} ${{ matrix.wasmtime == 'latest' && 'wasmtime_latest' || '' }}
100116
working-directory: ./src/hyperlight_wasm
101117

102118
- name: Test
103-
run: just test ${{ matrix.config }}
119+
run: just test ${{ matrix.config }} ${{ env.FEATURES }}
104120
working-directory: ./src/hyperlight_wasm
105121

106122
- name: Install github-cli (Windows)
@@ -118,7 +134,7 @@ jobs:
118134
shell: pwsh
119135

120136
- name: Test Examples
121-
run: just examples-ci ${{ matrix.config }}
137+
run: just examples-ci ${{ matrix.config }} ${{ env.FEATURES }}
122138
working-directory: ./src/hyperlight_wasm
123139
env:
124140
# required for gh cli when downloading
@@ -128,7 +144,7 @@ jobs:
128144

129145
- name: Download benchmarks from "latest"
130146
run: |
131-
just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.cpu }} dev-latest
147+
just bench-download ${{ runner.os }} ${{ matrix.hypervisor }} ${{ matrix.cpu }} dev-latest ${{ matrix.wasmtime }}
132148
env:
133149
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134150
continue-on-error: true
@@ -137,6 +153,6 @@ jobs:
137153

138154
- name: Run benchmarks
139155
run: |
140-
just bench-ci dev ${{ matrix.config }}
156+
just bench-ci dev ${{ matrix.config }} ${{ env.FEATURES }}
141157
working-directory: ./src/hyperlight_wasm
142158
if: ${{ matrix.config == 'release' }}

0 commit comments

Comments
 (0)