Skip to content
Merged
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 .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ RUN apt-get install -y g++-multilib \
&& apt-get install -y libgcc-${GCC_VERSION}-dev \
&& apt-get install -y lib32gcc-${GCC_VERSION}-dev

ARG WASI_SDK_VERSION_FULL=20.0
ARG WASI_SDK_VERSION_FULL=25.0
ARG WASI_SDK_VERSION_MAJOR=${WASI_SDK_VERSION_FULL%%.*}

# Install wasi-sdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CreateDevcontainerImage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:
LLVM_VERSION: 17
RUST_TOOLCHAIN_DEFAULT: 1.85.0
RUST_TOOLCHAIN_FILE: rust-toolchain.toml
WASI_SDK_VERSION_FULL: "20.0"
WASI_SDK_VERSION_FULL: "25.0"
GCC_VERSION: "12"

# There is a single job in this workflow. It's configured to run on the latest available version of Ubuntu.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/dep_build_wasm_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
load: true
push: ${{ env.DO_PUSH }}
build-args: |
WASI_SDK_VERSION_FULL=20.0
WASI_SDK_VERSION_FULL=25.0
GCC_VERSION=12
tags: ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:latest
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/wasm-clang-builder:buildcache
Expand Down
2 changes: 1 addition & 1 deletion src/hyperlight_wasm/scripts/build-wasm-examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ else

docker pull ghcr.io/hyperlight-dev/wasm-clang-builder:latest

docker build --build-arg GCC_VERSION=12 --build-arg WASI_SDK_VERSION_FULL=20.0 --cache-from ghcr.io/hyperlight-dev/wasm-clang-builder:latest -t wasm-clang-builder:latest . 2> ${OUTPUT_DIR}/dockerbuild.log
docker build --build-arg GCC_VERSION=12 --build-arg WASI_SDK_VERSION_FULL=25.0 --cache-from ghcr.io/hyperlight-dev/wasm-clang-builder:latest -t wasm-clang-builder:latest . 2> ${OUTPUT_DIR}/dockerbuild.log

for FILENAME in $(find . -name '*.c')
do
Expand Down
2 changes: 1 addition & 1 deletion src/hyperlight_wasm_macro/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions src/wasm_runtime/src/wasip1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ pub(crate) fn register_handlers<T: 'static>(linker: &mut Linker<T>) -> Result<()
linker.func_wrap("wasi_snapshot_preview1", "fd_close", |fd: i32| -> i32 {
panic!("fd_close called {}", fd);
})?;
linker.func_wrap(
"wasi_snapshot_preview1",
"random_get",
|buff: i32, len: i32| -> i32 {
panic!("random_get called for {} with len {}", buff, len);
},
)?;
linker.func_wrap(
"wasi_snapshot_preview1",
"fd_fdstat_get",
Expand Down
2 changes: 1 addition & 1 deletion src/wasmsamples/compile-wasm.bat
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ where docker || (

echo Building docker image that has Wasm sdk. Should be quick if no changes to docker image.
echo Log in %2\dockerbuild.log
%dockercmd% build --build-arg GCC_VERSION=12 --build-arg WASI_SDK_VERSION_FULL=20.0 --cache-from ghcr.io/hyperlight-dev/wasm-clang-builder:latest -t wasm-clang-builder:latest !dockerinput! 2> %2dockerbuild.log
%dockercmd% build --build-arg GCC_VERSION=12 --build-arg WASI_SDK_VERSION_FULL=25.0 --cache-from ghcr.io/hyperlight-dev/wasm-clang-builder:latest -t wasm-clang-builder:latest !dockerinput! 2> %2dockerbuild.log

echo Building Wasm files in %1 and output to %2
for /R "%1" %%i in (*.c) do (
Expand Down
10 changes: 5 additions & 5 deletions src/wasmsamples/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ RUN apt-get install -y wget \
&& apt-get install -y libgcc-${GCC_VERSION}-dev \
&& apt-get install -y lib32gcc-${GCC_VERSION}-dev

ARG WASI_SDK_VERSION_FULL=20.0
ARG WASI_SDK_VERSION_FULL=25.0
ARG WASI_SDK_VERSION_MAJOR=${WASI_SDK_VERSION_FULL%%.*}

RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION_MAJOR}/wasi-sdk-${WASI_SDK_VERSION_FULL}-linux.tar.gz \
&& tar xvf wasi-sdk-${WASI_SDK_VERSION_FULL}-linux.tar.gz \
&& rm wasi-sdk-${WASI_SDK_VERSION_FULL}-linux.tar.gz \
&& mv /wasi-sdk-${WASI_SDK_VERSION_FULL} /opt/wasi-sdk
RUN wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-${WASI_SDK_VERSION_MAJOR}/wasi-sdk-${WASI_SDK_VERSION_FULL}-x86_64-linux.tar.gz \
&& tar xvf wasi-sdk-${WASI_SDK_VERSION_FULL}-x86_64-linux.tar.gz \
&& rm wasi-sdk-${WASI_SDK_VERSION_FULL}-x86_64-linux.tar.gz \
&& mv /wasi-sdk-${WASI_SDK_VERSION_FULL}-x86_64-linux /opt/wasi-sdk
CMD ["/bin/sh"]
Loading