Skip to content

Commit a8564a0

Browse files
committed
refactor: move download-wasi-sdk from Justfile into cargo build script
1 parent 98b554b commit a8564a0

File tree

4 files changed

+242
-37
lines changed

4 files changed

+242
-37
lines changed

Cargo.lock

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

guests/python/Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ uuid.workspace = true
1818
wasip2.workspace = true
1919

2020
[build-dependencies]
21+
flate2 = "1.0.35"
22+
sha2 = "0.10.8"
2123
tar.workspace = true
24+
ureq = "2.12.1"
2225
walkdir = "2.5.0"
2326

2427
[lints]

guests/python/Justfile

Lines changed: 4 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -81,41 +81,12 @@ download-python-sdk:
8181
echo ::endgroup::
8282

8383
# download WASI SDK because we need some libraries during the static linking phase
84+
# This is now handled automatically by the build script (build.rs)
8485
[private]
8586
download-wasi-sdk:
86-
#!/usr/bin/env bash
87-
set -euo pipefail
88-
89-
echo ::group::guests::python::download-wasi-sdk
90-
set -x
91-
92-
mkdir -p downloads
93-
pushd downloads >/dev/null
94-
95-
# skip if already downloaded
96-
if [ -d wasi-sysroot ]; then
97-
echo "wasi sdk already present"
98-
set +x
99-
echo ::endgroup::
100-
exit 0
101-
fi
102-
103-
curl \
104-
--fail \
105-
--show-error \
106-
--silent \
107-
--proto '=https' \
108-
--tlsv1.2 \
109-
--location \
110-
--output "wasi-sysroot.tar.gz" \
111-
"https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-{{WASI_SDK_VERSION_MAJOR}}/wasi-sysroot-{{WASI_SDK_VERSION_MAJOR}}.{{WASI_SDK_VERSION_MINOR}}.tar.gz"
112-
113-
echo "{{SHA256_WASI_SDK_SYSROOT}} wasi-sysroot.tar.gz" | sha256sum -c
114-
tar xf wasi-sysroot.tar.gz
115-
mv wasi-sysroot-{{WASI_SDK_VERSION_MAJOR}}.{{WASI_SDK_VERSION_MINOR}} wasi-sysroot
116-
117-
set +x
118-
echo ::endgroup::
87+
@echo ::group::guests::python::download-wasi-sdk
88+
@echo "WASI SDK download is now handled by build.rs during cargo build"
89+
@echo ::endgroup::
11990

12091
[private]
12192
python-site-packages: download-python-sdk

0 commit comments

Comments
 (0)