From 77e17d8f7119191f5fd46640e2f110d157b3258c Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Tue, 3 Mar 2020 10:29:20 -0600 Subject: [PATCH] Add a wasmtime-specific `wasmtime_wat2wasm` C API (#1206) * Add a wasmtime-specific `wasmtime_wat2wasm` C API This commit implements a wasmtime-specific C API for converting the text format to the binary format. An upstream spec issue exists for adding this to the C API, but in the meantime we can experiment with our own version of this API and use it in the C# extension, for example! Closes #1000 * Reorder arguments * Use wasm_byte_vec_t for input `*.wat` * Mark wat input as const * Return an error message and use `fixed` * Actually include the error message * Use `fixed` in `Module.cs` as well --- Cargo.lock | 1 + crates/c-api/Cargo.toml | 1 + crates/c-api/include/wasmtime.h | 20 +++++++++++ crates/c-api/src/ext.rs | 33 +++++++++++++++++- crates/misc/dotnet/src/Engine.cs | 30 ++++++++++++++++ crates/misc/dotnet/src/Interop.cs | 15 ++++++-- crates/misc/dotnet/src/Module.cs | 12 ++----- .../dotnet/tests/Fixtures/ModuleFixture.cs | 4 ++- .../misc/dotnet/tests/FunctionExportsTests.cs | 2 +- .../misc/dotnet/tests/FunctionImportsTests.cs | 2 +- .../dotnet/tests/FunctionThunkingTests.cs | 2 +- .../misc/dotnet/tests/GlobalExportsTests.cs | 2 +- .../dotnet/tests/GlobalImportBindingTests.cs | 2 +- .../misc/dotnet/tests/GlobalImportsTests.cs | 2 +- .../misc/dotnet/tests/MemoryExportsTests.cs | 2 +- .../dotnet/tests/MemoryImportBindingTests.cs | 2 +- .../tests/MemoryImportFromModuleTests.cs | 2 +- .../tests/MemoryImportNoUpperBoundTests.cs | 2 +- .../tests/MemoryImportWithUpperBoundTests.cs | 2 +- .../dotnet/tests/Modules/FunctionExports.wasm | Bin 509 -> 0 bytes .../dotnet/tests/Modules/FunctionImports.wasm | Bin 442 -> 0 bytes .../tests/Modules/FunctionThunking.wasm | Bin 126 -> 0 bytes .../dotnet/tests/Modules/GlobalExports.wasm | Bin 194 -> 0 bytes .../tests/Modules/GlobalImportBindings.wasm | Bin 509 -> 0 bytes .../dotnet/tests/Modules/GlobalImports.wasm | Bin 176 -> 0 bytes .../dotnet/tests/Modules/MemoryExports.wasm | Bin 112 -> 0 bytes .../tests/Modules/MemoryImportBinding.wasm | Bin 287 -> 0 bytes .../tests/Modules/MemoryImportFromModule.wasm | Bin 22 -> 0 bytes .../Modules/MemoryImportNoUpperBound.wasm | Bin 19 -> 0 bytes .../Modules/MemoryImportWithUpperBound.wasm | Bin 20 -> 0 bytes .../dotnet/tests/Modules/TableExports.wasm | Bin 53 -> 0 bytes .../dotnet/tests/Modules/TableImports.wasm | Bin 52 -> 0 bytes crates/misc/dotnet/tests/Modules/Wasi.wasm | Bin 607 -> 0 bytes crates/misc/dotnet/tests/TableExportsTests.cs | 2 +- crates/misc/dotnet/tests/TableImportsTests.cs | 2 +- crates/misc/dotnet/tests/TempFile.cs | 2 +- crates/misc/dotnet/tests/WasiTests.cs | 2 +- .../misc/dotnet/tests/Wasmtime.Tests.csproj | 2 +- 38 files changed, 118 insertions(+), 30 deletions(-) delete mode 100644 crates/misc/dotnet/tests/Modules/FunctionExports.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/FunctionImports.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/FunctionThunking.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/GlobalExports.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/GlobalImportBindings.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/GlobalImports.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/MemoryExports.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/MemoryImportBinding.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/MemoryImportFromModule.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/MemoryImportNoUpperBound.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/MemoryImportWithUpperBound.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/TableExports.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/TableImports.wasm delete mode 100644 crates/misc/dotnet/tests/Modules/Wasi.wasm diff --git a/Cargo.lock b/Cargo.lock index aaf50dba6c..79865b4ccb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2263,6 +2263,7 @@ dependencies = [ "wasi-common", "wasmtime", "wasmtime-wasi", + "wat", ] [[package]] diff --git a/crates/c-api/Cargo.toml b/crates/c-api/Cargo.toml index 3b17fcce03..e489843651 100644 --- a/crates/c-api/Cargo.toml +++ b/crates/c-api/Cargo.toml @@ -20,3 +20,4 @@ doctest = false wasmtime = { path = "../api" } wasi-common = { path = "../wasi-common" } wasmtime-wasi = { path = "../wasi" } +wat = "1.0" diff --git a/crates/c-api/include/wasmtime.h b/crates/c-api/include/wasmtime.h index 16b463bb5a..f5f2d4df54 100644 --- a/crates/c-api/include/wasmtime.h +++ b/crates/c-api/include/wasmtime.h @@ -38,6 +38,26 @@ WASMTIME_CONFIG_PROP(cranelift_opt_level, wasmtime_opt_level_t) /////////////////////////////////////////////////////////////////////////////// +// Converts from the text format of WebAssembly to to the binary format. +// +// * `engine` - a previously created engine which will drive allocations and +// such +// * `wat` - this it the input buffer with the WebAssembly Text Format inside of +// it. This will be parsed and converted to the binary format. +// * `ret` - if the conversion is successful, this byte vector is filled in with +// the WebAssembly binary format. +// * `error_message` - if the conversion fails, this is filled in with a +// descriptive error message of why parsing failed. This parameter is +// optional. +// +// Returns `true` if conversion succeeded, or `false` if it failed. +bool wasmtime_wat2wasm( + wasm_engine_t *engine, + const wasm_byte_vec_t *wat, + own wasm_byte_vec_t *ret, + own wasm_byte_vec_t *error_message, +); + #ifdef __cplusplus } // extern "C" #endif diff --git a/crates/c-api/src/ext.rs b/crates/c-api/src/ext.rs index 549bb1e604..c61e7ad07d 100644 --- a/crates/c-api/src/ext.rs +++ b/crates/c-api/src/ext.rs @@ -1,7 +1,8 @@ //! This file defines the extern "C" API extension, which are specific //! to the wasmtime implementation. -use crate::wasm_config_t; +use crate::{wasm_byte_vec_t, wasm_config_t, wasm_engine_t}; +use std::str; use wasmtime::{OptLevel, Strategy}; #[repr(u8)] @@ -86,3 +87,33 @@ pub unsafe extern "C" fn wasmtime_config_cranelift_opt_level_set( WASMTIME_OPT_LEVEL_SPEED_AND_SIZE => OptLevel::SpeedAndSize, }); } + +#[no_mangle] +pub unsafe extern "C" fn wasmtime_wat2wasm( + _engine: *mut wasm_engine_t, + wat: *const wasm_byte_vec_t, + ret: *mut wasm_byte_vec_t, + error: *mut wasm_byte_vec_t, +) -> bool { + let wat = match str::from_utf8((*wat).as_slice()) { + Ok(s) => s, + Err(_) => { + if !error.is_null() { + (*error).set_from_slice(b"input was not valid utf-8"); + } + return false; + } + }; + match wat::parse_str(wat) { + Ok(bytes) => { + (*ret).set_from_slice(&bytes); + true + } + Err(e) => { + if !error.is_null() { + (*error).set_from_slice(e.to_string().as_bytes()); + } + false + } + } +} diff --git a/crates/misc/dotnet/src/Engine.cs b/crates/misc/dotnet/src/Engine.cs index 575e94e9bd..bc7a26106c 100644 --- a/crates/misc/dotnet/src/Engine.cs +++ b/crates/misc/dotnet/src/Engine.cs @@ -1,4 +1,6 @@ using System; +using System.Text; +using System.Runtime.InteropServices; namespace Wasmtime { @@ -40,6 +42,34 @@ namespace Wasmtime return new Store(this); } + /// + /// Converts the WebAssembly text format to the binary format + /// + /// Returns the binary-encoded wasm module. + public byte[] WatToWasm(string wat) + { + var watBytes = Encoding.UTF8.GetBytes(wat); + unsafe + { + fixed (byte *ptr = watBytes) + { + Interop.wasm_byte_vec_t watByteVec; + watByteVec.size = (UIntPtr)watBytes.Length; + watByteVec.data = ptr; + if (!Interop.wasmtime_wat2wasm(Handle, ref watByteVec, out var bytes, out var error)) { + var errorSpan = new ReadOnlySpan(error.data, checked((int)error.size)); + var message = Encoding.UTF8.GetString(errorSpan); + Interop.wasm_byte_vec_delete(ref error); + throw new WasmtimeException("failed to parse input wat: " + message); + } + var byteSpan = new ReadOnlySpan(bytes.data, checked((int)bytes.size)); + var ret = byteSpan.ToArray(); + Interop.wasm_byte_vec_delete(ref bytes); + return ret; + } + } + } + /// public void Dispose() { diff --git a/crates/misc/dotnet/src/Interop.cs b/crates/misc/dotnet/src/Interop.cs index 24baac04e3..877b5efd88 100644 --- a/crates/misc/dotnet/src/Interop.cs +++ b/crates/misc/dotnet/src/Interop.cs @@ -899,7 +899,7 @@ namespace Wasmtime public static extern bool wasi_config_set_stdin_file( WasiConfigHandle config, [MarshalAs(UnmanagedType.LPUTF8Str)] string path - ); + ); [DllImport(LibraryName)] public static extern void wasi_config_inherit_stdin(WasiConfigHandle config); @@ -909,7 +909,7 @@ namespace Wasmtime public static extern bool wasi_config_set_stdout_file( WasiConfigHandle config, [MarshalAs(UnmanagedType.LPUTF8Str)] string path - ); + ); [DllImport(LibraryName)] public static extern void wasi_config_inherit_stdout(WasiConfigHandle config); @@ -919,7 +919,7 @@ namespace Wasmtime public static extern bool wasi_config_set_stderr_file( WasiConfigHandle config, [MarshalAs(UnmanagedType.LPUTF8Str)] string path - ); + ); [DllImport(LibraryName)] public static extern void wasi_config_inherit_stderr(WasiConfigHandle config); @@ -974,5 +974,14 @@ namespace Wasmtime [DllImport(LibraryName)] public static extern void wasmtime_config_cranelift_opt_level_set(WasmConfigHandle config, wasmtime_opt_level_t level); + + [DllImport(LibraryName, CharSet=CharSet.Ansi)] + [return: MarshalAs(UnmanagedType.I1)] + public static extern bool wasmtime_wat2wasm( + EngineHandle engine, + ref wasm_byte_vec_t wat, + out wasm_byte_vec_t vec, + out wasm_byte_vec_t error_message + ); } } diff --git a/crates/misc/dotnet/src/Module.cs b/crates/misc/dotnet/src/Module.cs index 203e5f7a6a..ac520cebe0 100644 --- a/crates/misc/dotnet/src/Module.cs +++ b/crates/misc/dotnet/src/Module.cs @@ -15,15 +15,13 @@ namespace Wasmtime throw new ArgumentNullException(nameof(store)); } - var bytesHandle = GCHandle.Alloc(bytes, GCHandleType.Pinned); - - try + unsafe { - unsafe + fixed (byte *ptr = bytes) { Interop.wasm_byte_vec_t vec; vec.size = (UIntPtr)bytes.Length; - vec.data = (byte*)bytesHandle.AddrOfPinnedObject(); + vec.data = ptr; Handle = Interop.wasm_module_new(store.Handle, ref vec); } @@ -33,10 +31,6 @@ namespace Wasmtime throw new WasmtimeException($"WebAssembly module '{name}' is not valid."); } } - finally - { - bytesHandle.Free(); - } Store = store; Name = name; diff --git a/crates/misc/dotnet/tests/Fixtures/ModuleFixture.cs b/crates/misc/dotnet/tests/Fixtures/ModuleFixture.cs index d3a08a6dce..2eeb9f7482 100644 --- a/crates/misc/dotnet/tests/Fixtures/ModuleFixture.cs +++ b/crates/misc/dotnet/tests/Fixtures/ModuleFixture.cs @@ -13,7 +13,9 @@ namespace Wasmtime.Tests .WithReferenceTypes(true) .Build(); Store = Engine.CreateStore(); - Module = Store.CreateModule(Path.Combine("Modules", ModuleFileName)); + var wat = Path.Combine("Modules", ModuleFileName); + var wasm = Engine.WatToWasm(File.ReadAllText(wat)); + Module = Store.CreateModule(wat, wasm); } public void Dispose() diff --git a/crates/misc/dotnet/tests/FunctionExportsTests.cs b/crates/misc/dotnet/tests/FunctionExportsTests.cs index 01d0929216..ff06f14d5c 100644 --- a/crates/misc/dotnet/tests/FunctionExportsTests.cs +++ b/crates/misc/dotnet/tests/FunctionExportsTests.cs @@ -8,7 +8,7 @@ namespace Wasmtime.Tests { public class FunctionExportsFixture : ModuleFixture { - protected override string ModuleFileName => "FunctionExports.wasm"; + protected override string ModuleFileName => "FunctionExports.wat"; } public class FunctionExportsTests : IClassFixture diff --git a/crates/misc/dotnet/tests/FunctionImportsTests.cs b/crates/misc/dotnet/tests/FunctionImportsTests.cs index bb2bdff302..bb90ad5d7b 100644 --- a/crates/misc/dotnet/tests/FunctionImportsTests.cs +++ b/crates/misc/dotnet/tests/FunctionImportsTests.cs @@ -8,7 +8,7 @@ namespace Wasmtime.Tests { public class FunctionImportsFixture : ModuleFixture { - protected override string ModuleFileName => "FunctionImports.wasm"; + protected override string ModuleFileName => "FunctionImports.wat"; } public class FunctionImportsTests : IClassFixture diff --git a/crates/misc/dotnet/tests/FunctionThunkingTests.cs b/crates/misc/dotnet/tests/FunctionThunkingTests.cs index 97eba2a299..116c2c65be 100644 --- a/crates/misc/dotnet/tests/FunctionThunkingTests.cs +++ b/crates/misc/dotnet/tests/FunctionThunkingTests.cs @@ -7,7 +7,7 @@ namespace Wasmtime.Tests { public class FunctionThunkingFixture : ModuleFixture { - protected override string ModuleFileName => "FunctionThunking.wasm"; + protected override string ModuleFileName => "FunctionThunking.wat"; } public class FunctionThunkingTests : IClassFixture diff --git a/crates/misc/dotnet/tests/GlobalExportsTests.cs b/crates/misc/dotnet/tests/GlobalExportsTests.cs index ca143f7286..8dc67f254c 100644 --- a/crates/misc/dotnet/tests/GlobalExportsTests.cs +++ b/crates/misc/dotnet/tests/GlobalExportsTests.cs @@ -10,7 +10,7 @@ namespace Wasmtime.Tests { public class GlobalExportsFixture : ModuleFixture { - protected override string ModuleFileName => "GlobalExports.wasm"; + protected override string ModuleFileName => "GlobalExports.wat"; } public class GlobalExportsTests : IClassFixture diff --git a/crates/misc/dotnet/tests/GlobalImportBindingTests.cs b/crates/misc/dotnet/tests/GlobalImportBindingTests.cs index 7969a90641..c87a9d3b51 100644 --- a/crates/misc/dotnet/tests/GlobalImportBindingTests.cs +++ b/crates/misc/dotnet/tests/GlobalImportBindingTests.cs @@ -6,7 +6,7 @@ namespace Wasmtime.Tests { public class GlobalImportBindingFixture : ModuleFixture { - protected override string ModuleFileName => "GlobalImportBindings.wasm"; + protected override string ModuleFileName => "GlobalImportBindings.wat"; } public class GlobalImportBindingTests : IClassFixture diff --git a/crates/misc/dotnet/tests/GlobalImportsTests.cs b/crates/misc/dotnet/tests/GlobalImportsTests.cs index 2479baf132..4087b503ce 100644 --- a/crates/misc/dotnet/tests/GlobalImportsTests.cs +++ b/crates/misc/dotnet/tests/GlobalImportsTests.cs @@ -8,7 +8,7 @@ namespace Wasmtime.Tests { public class GlobalImportsFixture : ModuleFixture { - protected override string ModuleFileName => "GlobalImports.wasm"; + protected override string ModuleFileName => "GlobalImports.wat"; } public class GlobalImportsTests : IClassFixture diff --git a/crates/misc/dotnet/tests/MemoryExportsTests.cs b/crates/misc/dotnet/tests/MemoryExportsTests.cs index 08242e75c7..30035e21e4 100644 --- a/crates/misc/dotnet/tests/MemoryExportsTests.cs +++ b/crates/misc/dotnet/tests/MemoryExportsTests.cs @@ -8,7 +8,7 @@ namespace Wasmtime.Tests { public class MemoryExportsFixture : ModuleFixture { - protected override string ModuleFileName => "MemoryExports.wasm"; + protected override string ModuleFileName => "MemoryExports.wat"; } public class MemoryExportsTests : IClassFixture diff --git a/crates/misc/dotnet/tests/MemoryImportBindingTests.cs b/crates/misc/dotnet/tests/MemoryImportBindingTests.cs index cab85e2434..6b59064c95 100644 --- a/crates/misc/dotnet/tests/MemoryImportBindingTests.cs +++ b/crates/misc/dotnet/tests/MemoryImportBindingTests.cs @@ -6,7 +6,7 @@ namespace Wasmtime.Tests { public class MemoryImportBindingFixture : ModuleFixture { - protected override string ModuleFileName => "MemoryImportBinding.wasm"; + protected override string ModuleFileName => "MemoryImportBinding.wat"; } public class MemoryImportBindingTests : IClassFixture diff --git a/crates/misc/dotnet/tests/MemoryImportFromModuleTests.cs b/crates/misc/dotnet/tests/MemoryImportFromModuleTests.cs index b47da19374..6396f4c87c 100644 --- a/crates/misc/dotnet/tests/MemoryImportFromModuleTests.cs +++ b/crates/misc/dotnet/tests/MemoryImportFromModuleTests.cs @@ -6,7 +6,7 @@ namespace Wasmtime.Tests { public class MemoryImportFromModuleFixture : ModuleFixture { - protected override string ModuleFileName => "MemoryImportFromModule.wasm"; + protected override string ModuleFileName => "MemoryImportFromModule.wat"; } public class MemoryImportFromModuleTests : IClassFixture diff --git a/crates/misc/dotnet/tests/MemoryImportNoUpperBoundTests.cs b/crates/misc/dotnet/tests/MemoryImportNoUpperBoundTests.cs index 8a9586bd28..47e1ebc042 100644 --- a/crates/misc/dotnet/tests/MemoryImportNoUpperBoundTests.cs +++ b/crates/misc/dotnet/tests/MemoryImportNoUpperBoundTests.cs @@ -6,7 +6,7 @@ namespace Wasmtime.Tests { public class MemoryImportNoUpperBoundFixture : ModuleFixture { - protected override string ModuleFileName => "MemoryImportNoUpperBound.wasm"; + protected override string ModuleFileName => "MemoryImportNoUpperBound.wat"; } public class MemoryImportNoUpperBoundTests : IClassFixture diff --git a/crates/misc/dotnet/tests/MemoryImportWithUpperBoundTests.cs b/crates/misc/dotnet/tests/MemoryImportWithUpperBoundTests.cs index ec73d9da21..0dc9791160 100644 --- a/crates/misc/dotnet/tests/MemoryImportWithUpperBoundTests.cs +++ b/crates/misc/dotnet/tests/MemoryImportWithUpperBoundTests.cs @@ -6,7 +6,7 @@ namespace Wasmtime.Tests { public class MemoryImportWithUpperBoundFixture : ModuleFixture { - protected override string ModuleFileName => "MemoryImportWithUpperBound.wasm"; + protected override string ModuleFileName => "MemoryImportWithUpperBound.wat"; } public class MemoryImportWithUpperBoundTests : IClassFixture diff --git a/crates/misc/dotnet/tests/Modules/FunctionExports.wasm b/crates/misc/dotnet/tests/Modules/FunctionExports.wasm deleted file mode 100644 index 73e90b1387dd8bb2a092c3a1dc3bc31966c35957..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 509 zcmaixO%8%E5QSf%ic;Jeb?X(>xO3spEnJjFA(|){(S?b?@w}E(szH&&rY|#@Z>IB- zLM2BAfXzG~@L5jENGa(KpXXUh0W2qFq?B~`QPd4BQoG}USvGGpomSfw&cpJ$Q7ljD ztd5DK>>MQ5!zBR*aTLh?cx2coVg^kozsM?3ST|)GR5!(YdRO5=#-R+x z^!B!645C>@^zaKg6{PLFP^*f{sdis)Fn!-H++k@?McdjQ;jTRkqH;Or5F85#2TS@q R2!WN3`iL&kg{l83J^|Bujlci^ diff --git a/crates/misc/dotnet/tests/Modules/FunctionImports.wasm b/crates/misc/dotnet/tests/Modules/FunctionImports.wasm deleted file mode 100644 index f52c32c22f68b1bbdf2dd5eab7872cae15b336e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 442 zcmZvW$qs@r6h&`wo_0jp`U`5@`7Nc95=fvW3=0#1U-lDxPz)+8Zu-*mh69ns3;?@r zUBG2ErJ|ISC){aWmGpqsl!{VPo-W#dL)+4NSv%ND^F*W~&Nx-6%!(+_Xt$%4?MWrMw>P>od+_t{X*UIP%G}II_9zVibw))K+TiC diff --git a/crates/misc/dotnet/tests/Modules/FunctionThunking.wasm b/crates/misc/dotnet/tests/Modules/FunctionThunking.wasm deleted file mode 100644 index a8a67acb1c8d95fc18ad155eedf7c7c196cc43bb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 126 zcmX}ju?~YE6ouh)?xn4fq0F7!eJCY?#Dzj=Q{%*|YX{x_{K*IZNd&-NW@(LW2IM6g z-#_&s0RQSjp1w=XE2t`rfHO4IJ$b DhqxM1 diff --git a/crates/misc/dotnet/tests/Modules/GlobalExports.wasm b/crates/misc/dotnet/tests/Modules/GlobalExports.wasm deleted file mode 100644 index 9e9f358fc5284af1e307505bd47cf1a41d50a535..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 194 zcmZQbEY4+QU|?Xg<)~+HWZ=B*bMliCbK*0NjhGqu5S;kj(h_DyxU888GZS3a%mggU43kX* X>Sck+0y$t=R=6xsFB@DIs+S!AYN0PI diff --git a/crates/misc/dotnet/tests/Modules/GlobalImportBindings.wasm b/crates/misc/dotnet/tests/Modules/GlobalImportBindings.wasm deleted file mode 100644 index 8933739d655fbc5a6d59dec1479616b090307a42..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 509 zcmY+9O%8%E5QX2gr68aSPoU8gDB%X4gKDD0MB_r;@w4`@-oduiwB0b1FW-ApaD3hg z0If3x8WoMub5Jyx*(>VJ>=boiAIh+3Z;#XQ)?D|y=Kg;1k&t`DM|h*ItT6;eUGc#i z7uV5yLnGb?hU@48Lw9uG^AaG&xDbhyY5Jvd*`8mGe~P(niXsSFJ|kc)7DcC%;8C=$ zAfl+Vk}&H22QrLmh%}7;tt^VVzF8F2SMw<9tRg>@0vi7z?&%nTk;Kt{cmN3^dB2<`}FxMfeFf#$G zs6(ho1Da8bPyytERn#J>0Gd&QqylP24I^uQNk(ds5Y+axqWs+W-29Z%oK&Er0Q=Z9 AOaK4? diff --git a/crates/misc/dotnet/tests/Modules/MemoryExports.wasm b/crates/misc/dotnet/tests/Modules/MemoryExports.wasm deleted file mode 100644 index bc0fe01a33a9e38e33927684a06374ccac3e93c0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 112 zcmXAgF$#b%5Cr#PB!O)e1slP_)+czKKS(W@E%DiLxic(5-@sv>xEJ(Tt)UZl4M%q?jk%|-C>SNy5YCW-?e z-(wyyNd9vIK)v7>bP^l|2fZWH?X!bLoS&>xI3GPmMt?qSyRh4LW=f=Q2ya6oSf2W$mCslLwtZN>=G=B8j_}J&X zv2a3PX_gg_o1)CNa*2uL4l4z?kOM6*z(s5WFMPQni#{*lMr@mCASUMeT_0QkMY$}L diff --git a/crates/misc/dotnet/tests/Modules/MemoryImportFromModule.wasm b/crates/misc/dotnet/tests/Modules/MemoryImportFromModule.wasm deleted file mode 100644 index 73e12cb7cf1f6f05de3eb8662923d812e2808b77..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22 dcmZQbEY4+QU|?Y4VPwiGX3kB`WnyGx0stx619<=d diff --git a/crates/misc/dotnet/tests/Modules/MemoryImportNoUpperBound.wasm b/crates/misc/dotnet/tests/Modules/MemoryImportNoUpperBound.wasm deleted file mode 100644 index 813fefe6648bfd250032f5fa39e3af201e8f52a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 19 acmZQbEY4+QU|?Y4WMp8@P0eLuU<3dhHv*IZ diff --git a/crates/misc/dotnet/tests/Modules/MemoryImportWithUpperBound.wasm b/crates/misc/dotnet/tests/Modules/MemoryImportWithUpperBound.wasm deleted file mode 100644 index 0776ce28e204650434c09960e68d2eb267a60cce..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20 bcmZQbEY4+QU|?Y4Vq{>>P0eLuR diff --git a/crates/misc/dotnet/tests/Modules/Wasi.wasm b/crates/misc/dotnet/tests/Modules/Wasi.wasm deleted file mode 100644 index 62644ebfed2225ffdc0de31ee6e7fc528686f541..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 607 zcma)&O>ToQ5QS%KeoRa#RVCK$5qhA?u@W~y;!idTY8T-m-Swiyq(EDVC|=kz^FBR! z9w=KP0N}H?BYltk&g+LWyy&jTHT~t{Cgh8-tW!3Zwo;8f)vaudKIgi7dDPW8H+3a# z{-Lcr>K0%H3J1bybyx+Q#lEPm2C`xiHL5+y zy3rL-8nGcxKqSE!l`#+?Fa`co;8c*QpgbNKK?F^`-;K|MK}iFi&4BQPF9Hz? HmWKQrp5L^i diff --git a/crates/misc/dotnet/tests/TableExportsTests.cs b/crates/misc/dotnet/tests/TableExportsTests.cs index ebd86658c6..bacc818b93 100644 --- a/crates/misc/dotnet/tests/TableExportsTests.cs +++ b/crates/misc/dotnet/tests/TableExportsTests.cs @@ -8,7 +8,7 @@ namespace Wasmtime.Tests { public class TableExportsFixture : ModuleFixture { - protected override string ModuleFileName => "TableExports.wasm"; + protected override string ModuleFileName => "TableExports.wat"; } public class TableExportsTests : IClassFixture diff --git a/crates/misc/dotnet/tests/TableImportsTests.cs b/crates/misc/dotnet/tests/TableImportsTests.cs index 265205e0c1..8b730fd6b4 100644 --- a/crates/misc/dotnet/tests/TableImportsTests.cs +++ b/crates/misc/dotnet/tests/TableImportsTests.cs @@ -8,7 +8,7 @@ namespace Wasmtime.Tests { public class TableImportsFixture : ModuleFixture { - protected override string ModuleFileName => "TableImports.wasm"; + protected override string ModuleFileName => "TableImports.wat"; } public class TableImportsTests : IClassFixture diff --git a/crates/misc/dotnet/tests/TempFile.cs b/crates/misc/dotnet/tests/TempFile.cs index 6456b37b72..03ecd908b9 100644 --- a/crates/misc/dotnet/tests/TempFile.cs +++ b/crates/misc/dotnet/tests/TempFile.cs @@ -21,4 +21,4 @@ namespace Wasmtime.Tests public string Path { get; private set; } } -} \ No newline at end of file +} diff --git a/crates/misc/dotnet/tests/WasiTests.cs b/crates/misc/dotnet/tests/WasiTests.cs index 06d332634d..44696ee9dc 100644 --- a/crates/misc/dotnet/tests/WasiTests.cs +++ b/crates/misc/dotnet/tests/WasiTests.cs @@ -9,7 +9,7 @@ namespace Wasmtime.Tests { public class WasiFixture : ModuleFixture { - protected override string ModuleFileName => "Wasi.wasm"; + protected override string ModuleFileName => "Wasi.wat"; } public class WasiTests : IClassFixture diff --git a/crates/misc/dotnet/tests/Wasmtime.Tests.csproj b/crates/misc/dotnet/tests/Wasmtime.Tests.csproj index 20f4181420..e3f9717d33 100644 --- a/crates/misc/dotnet/tests/Wasmtime.Tests.csproj +++ b/crates/misc/dotnet/tests/Wasmtime.Tests.csproj @@ -27,7 +27,7 @@ - +