File tree Expand file tree Collapse file tree 8 files changed +49
-17
lines changed
Expand file tree Collapse file tree 8 files changed +49
-17
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,22 @@ jobs:
3636 submodules : recursive
3737
3838 - uses : actions/cache@v3
39+ if : always()
3940 with :
40- path : " build/vcpkg_installed/**/*"
41- key : ${{ matrix.os }}-vcpkg_installed
41+ key : ${{ matrix.os }}-packages
42+ path : |
43+ "build/vcpkg_installed/**/*"
44+ ~/.cargo/registry
45+ ~/.cargo/git
4246
4347 - name : install dependencies
4448 run : |
4549 brew install pkg-config autoconf autoconf-archive automake coreutils libtool cmake ninja
4650
51+ - name : Install rust dependencies
52+ run : |
53+ cargo install wasm-tools wit-bindgen-cli
54+
4755 - name : configure
4856 run : |
4957 cmake --preset linux-ninja-Debug
Original file line number Diff line number Diff line change 3030 submodules : recursive
3131
3232 - uses : actions/cache@v3
33+ if : always()
3334 with :
34- path : " build/vcpkg_installed/**/*"
35- key : ${{ matrix.os }}-vcpkg_installed
35+ key : ${{ matrix.os }}-packages
36+ path : |
37+ "build/vcpkg_installed/**/*"
38+ ~/.cargo/registry
39+ ~/.cargo/git
3640
3741 - name : install dependencies
3842 run : |
4347 build-essential \
4448 ninja-build
4549
50+ - name : Install rust dependencies
51+ run : |
52+ cargo install wasm-tools wit-bindgen-cli
53+
4654 - name : configure
4755 run : |
4856 cmake --preset linux-ninja-Debug
Original file line number Diff line number Diff line change 3131 submodules : recursive
3232
3333 - uses : actions/cache@v3
34+ if : always()
3435 with :
35- path : " build/vcpkg_installed/**/*"
36- key : ${{ matrix.os }}-vcpkg_installed
36+ key : ${{ matrix.os }}-packages
37+ path : |
38+ "build/vcpkg_installed/**/*"
39+ ~/.cargo/registry
40+ ~/.cargo/git
41+
42+ - name : Install rust dependencies
43+ run : |
44+ cargo install wasm-tools wit-bindgen-cli
3745
3846 - name : configure
3947 run : |
Original file line number Diff line number Diff line change @@ -82,10 +82,6 @@ namespace cmcpp
8282 list_t <T> lift_flat (const CallContext &cx, const CoreValueIter &vi)
8383 {
8484 auto ptr = vi.next <int32_t >();
85- if (vi.done ())
86- {
87- return cmcpp::list::load<T>(cx, ptr);
88- }
8985 auto length = vi.next <int32_t >();
9086 return load_from_range<T>(cx, ptr, length);
9187 }
Original file line number Diff line number Diff line change @@ -320,10 +320,6 @@ namespace cmcpp
320320 T lift_flat (const CallContext &cx, const CoreValueIter &vi)
321321 {
322322 auto ptr = vi.next <int32_t >();
323- if (vi.done ())
324- {
325- return cmcpp::string::load<T>(cx, ptr);
326- }
327323 auto packed_length = vi.next <int32_t >();
328324 return load_from_range<T>(cx, ptr, packed_length);
329325 }
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ namespace cmcpp
1111 {
1212 if (condition)
1313 {
14- cx.trap (message);
14+ cx.trap (message == nullptr ? " Unknown trap " : message );
1515 }
1616 }
1717
@@ -31,7 +31,7 @@ namespace cmcpp
3131 {
3232 uint32_t retVal = v;
3333 trap_if (cx, retVal >= 0x110000 );
34- trap_if (cx, 0xD800 <= retVal && retVal <= 0xDFFF );
34+ trap_if (cx, 0xD800 <= retVal && retVal <= 0xDFFF , " Invalid char value " );
3535 return retVal;
3636 }
3737
Original file line number Diff line number Diff line change 1+ # https://github.com/WebAssembly/wasi-sdk/releases
2+
3+ if (APPLE )
4+ vcpkg_download_distfile (ARCHIVE
5+ URLS "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-${VERSION} -arm64-macos.tar.gz"
6+ FILENAME "wasi-sdk-${VERSION} -x86_64-linux.tar.gz"
7+ SHA512 fa4852de1995eaaf5aa57dab9896604a27f157b6113ca0daa27fe7588f4276e18362e650bdb6c65fd83f14d4b8347f8134c9b531a8b872ad83c18d481eeef6c5
8+ )
9+ elseif (UNIX )
110vcpkg_download_distfile (ARCHIVE
211 URLS "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-${VERSION} -x86_64-linux.tar.gz"
312 FILENAME "wasi-sdk-${VERSION} -x86_64-linux.tar.gz"
413 SHA512 716acc4b737ad6f51c6b32c3423612c03df9a3165bde3d6e24df5c86779b8be9463f5a79e620f2fc49707275563a6c9710242caca27e1ad9dd2c69e8fce8a766
514)
615
16+ elseif (WIN32 )
17+ vcpkg_download_distfile (ARCHIVE
18+ URLS "https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sdk-${VERSION} -x86_64-windows.tar.gz"
19+ FILENAME "wasi-sdk-${VERSION} -x86_64-windows.tar.gz"
20+ SHA512 0
21+ )
22+ endif ()
23+
724vcpkg_extract_source_archive_ex (
825 OUT_SOURCE_PATH SOURCE_PATH
926 ARCHIVE ${ARCHIVE}
Original file line number Diff line number Diff line change 33 "version-string" : " 25.0" ,
44 "description" : " Wasi SDK for building wasm from C++." ,
55 "homepage" : " https://github.com/WebAssembly/wasi-sdk" ,
6- "supports" : " linux" ,
76 "license" : " Apache-2.0"
87}
You can’t perform that action at this time.
0 commit comments