forked from TechEmpower/FrameworkBenchmarks
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[xitca-web] update wasmtime. (TechEmpower#8419)
* [xitca-web]update wasmtime. * simplify router constructor.
- Loading branch information
1 parent
4da046b
commit e30b372
Showing
6 changed files
with
55 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
[toolchain] | ||
channel = "nightly-2023-06-28" | ||
channel = "nightly-2023-09-13" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,35 @@ | ||
ARG WASMTIME_VERSION=12.0.1 | ||
ARG WASM_TARGET=wasm32-wasi-preview1-threads | ||
|
||
FROM rust:1.67 AS compile | ||
|
||
ARG WASMTIME_VERSION=11.0.1 | ||
ARG WASMTIME_VERSION | ||
ARG WASM_TARGET | ||
|
||
WORKDIR /tmp | ||
COPY / ./ | ||
RUN curl -LSs "https://github.com/bytecodealliance/wasmtime/releases/download/v${WASMTIME_VERSION}/wasmtime-v${WASMTIME_VERSION}-$(uname -m)-linux.tar.xz" | \ | ||
tar --strip-components=1 -Jx && \ | ||
rustup target add wasm32-wasi && \ | ||
cargo build --bin xitca-web-wasm --features serde,web --release --target wasm32-wasi | ||
rustup target add ${WASM_TARGET} && \ | ||
cargo build --bin xitca-web-wasm --features serde,web --release --target ${WASM_TARGET} | ||
|
||
|
||
FROM ubuntu:22.04 | ||
|
||
ARG WASM_TARGET | ||
|
||
COPY --from=compile \ | ||
/tmp/target/wasm32-wasi/release/xitca-web-wasm.wasm \ | ||
/tmp/target/${WASM_TARGET}/release/xitca-web-wasm.wasm \ | ||
/tmp/wasmtime \ | ||
/opt/xitca-web-wasm/ | ||
EXPOSE 8080 | ||
ARG BENCHMARK_ENV | ||
ARG TFB_TEST_DATABASE | ||
ARG TFB_TEST_NAME | ||
|
||
CMD /opt/xitca-web-wasm/wasmtime compile /opt/xitca-web-wasm/xitca-web-wasm.wasm && \ | ||
/opt/xitca-web-wasm/wasmtime run xitca-web-wasm.cwasm \ | ||
CMD /opt/xitca-web-wasm/wasmtime run /opt/xitca-web-wasm/xitca-web-wasm.wasm \ | ||
--wasm-features=threads \ | ||
--wasi-modules experimental-wasi-threads \ | ||
--allow-precompiled \ | ||
--env FD_COUNT=3 \ | ||
--tcplisten 0.0.0.0:8080 |