diff --git a/src/libraries/System.Net.Http/src/System.Net.Http.csproj b/src/libraries/System.Net.Http/src/System.Net.Http.csproj index 7dfbc43fc4a..28264a5d416 100644 --- a/src/libraries/System.Net.Http/src/System.Net.Http.csproj +++ b/src/libraries/System.Net.Http/src/System.Net.Http.csproj @@ -460,16 +460,16 @@ - - - - - - - - - - + + + + + + + + + + diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpHandler.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpHandler.cs index dcccb989910..bd825439140 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpHandler.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpHandler.cs @@ -12,8 +12,8 @@ using System.Threading; using System.Threading.Tasks; using WasiHttpWorld; -using WasiHttpWorld.wit.imports.wasi.http.v0_2_1; -using WasiHttpWorld.wit.imports.wasi.io.v0_2_1; +using WasiHttpWorld.wit.imports.wasi.http.v0_2_0; +using WasiHttpWorld.wit.imports.wasi.io.v0_2_0; namespace System.Net.Http { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.clocks.v0_2_1.MonotonicClockInterop.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.clocks.v0_2_0.MonotonicClockInterop.cs similarity index 77% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.clocks.v0_2_1.MonotonicClockInterop.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.clocks.v0_2_0.MonotonicClockInterop.cs index 1de0ee2b247..26ccb2ba99b 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.clocks.v0_2_1.MonotonicClockInterop.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.clocks.v0_2_0.MonotonicClockInterop.cs @@ -11,13 +11,13 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.clocks.v0_2_1 +namespace WasiHttpWorld.wit.imports.wasi.clocks.v0_2_0 { internal static class MonotonicClockInterop { internal static class NowWasmInterop { - [DllImport("wasi:clocks/monotonic-clock@0.2.1", EntryPoint = "now"), WasmImportLinkage] + [DllImport("wasi:clocks/monotonic-clock@0.2.0", EntryPoint = "now"), WasmImportLinkage] internal static extern long wasmImportNow(); } @@ -32,7 +32,7 @@ internal static unsafe ulong Now() internal static class ResolutionWasmInterop { - [DllImport("wasi:clocks/monotonic-clock@0.2.1", EntryPoint = "resolution"), WasmImportLinkage] + [DllImport("wasi:clocks/monotonic-clock@0.2.0", EntryPoint = "resolution"), WasmImportLinkage] internal static extern long wasmImportResolution(); } @@ -47,15 +47,15 @@ internal static unsafe ulong Resolution() internal static class SubscribeInstantWasmInterop { - [DllImport("wasi:clocks/monotonic-clock@0.2.1", EntryPoint = "subscribe-instant"), WasmImportLinkage] + [DllImport("wasi:clocks/monotonic-clock@0.2.0", EntryPoint = "subscribe-instant"), WasmImportLinkage] internal static extern int wasmImportSubscribeInstant(long p0); } - internal static unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable SubscribeInstant(ulong when) + internal static unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable SubscribeInstant(ulong when) { var result = SubscribeInstantWasmInterop.wasmImportSubscribeInstant(unchecked((long)(when))); - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -63,15 +63,15 @@ internal static class SubscribeInstantWasmInterop internal static class SubscribeDurationWasmInterop { - [DllImport("wasi:clocks/monotonic-clock@0.2.1", EntryPoint = "subscribe-duration"), WasmImportLinkage] + [DllImport("wasi:clocks/monotonic-clock@0.2.0", EntryPoint = "subscribe-duration"), WasmImportLinkage] internal static extern int wasmImportSubscribeDuration(long p0); } - internal static unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable SubscribeDuration(ulong when) + internal static unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable SubscribeDuration(ulong when) { var result = SubscribeDurationWasmInterop.wasmImportSubscribeDuration(unchecked((long)(when))); - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.cs similarity index 90% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.cs index ed00640bb85..2181c840c4b 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.cs @@ -11,7 +11,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.http.v0_2_1; +namespace WasiHttpWorld.wit.imports.wasi.http.v0_2_0; internal interface ITypes { @@ -608,7 +608,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]fields"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]fields"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -624,7 +624,7 @@ protected virtual void Dispose(bool disposing) { internal static class ConstructorWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[constructor]fields"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[constructor]fields"), WasmImportLinkage] internal static extern int wasmImportConstructor(); } @@ -639,12 +639,12 @@ internal unsafe Fields() internal static class FromListWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[static]fields.from-list"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[static]fields.from-list"), WasmImportLinkage] internal static extern void wasmImportFromList(nint p0, int p1, nint p2); } - internal static unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields FromList(List<(string, byte[])> entries) + internal static unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields FromList(List<(string, byte[])> entries) { byte[] buffer0 = new byte[16 * entries.Count]; @@ -673,40 +673,40 @@ internal static class FromListWasmInterop var ptr = (nint)retAreaByte0; FromListWasmInterop.wasmImportFromList((int)address, entries.Count, ptr); - Result lifted11; + Result lifted11; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); - lifted11 = Result.ok(resource); + lifted11 = Result.ok(resource); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError lifted; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.invalidSyntax(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.invalidSyntax(); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.forbidden(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.forbidden(); break; } case 2: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.immutable(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.immutable(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 4), 1)[0]}"); } - lifted11 = Result.err(lifted); + lifted11 = Result.err(lifted); break; } @@ -726,7 +726,7 @@ internal static class FromListWasmInterop internal static class GetWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]fields.get"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]fields.get"), WasmImportLinkage] internal static extern void wasmImportGet(int p0, nint p1, int p2, nint p3); } @@ -761,7 +761,7 @@ internal unsafe List Get(string name) internal static class HasWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]fields.has"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]fields.has"), WasmImportLinkage] internal static extern int wasmImportHas(int p0, nint p1, int p2); } @@ -780,7 +780,7 @@ internal unsafe bool Has(string name) internal static class SetWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]fields.set"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]fields.set"), WasmImportLinkage] internal static extern void wasmImportSet(int p0, nint p1, int p2, nint p3, int p4, nint p5); } @@ -813,39 +813,39 @@ internal unsafe void Set(string name, List value) var ptr = (nint)retAreaByte0; SetWasmInterop.wasmImportSet(handle, interopString.ToInt32(), lengthresult, (int)address, value.Count, ptr); - Result lifted11; + Result lifted11; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted11 = Result.ok(new global::WasiHttpWorld.None()); + lifted11 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError lifted; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError lifted; switch (new Span((void*)(ptr + 1), 1)[0]) { case 0: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.invalidSyntax(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.invalidSyntax(); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.forbidden(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.forbidden(); break; } case 2: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.immutable(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.immutable(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 1), 1)[0]}"); } - lifted11 = Result.err(lifted); + lifted11 = Result.err(lifted); break; } @@ -865,7 +865,7 @@ internal unsafe void Set(string name, List value) internal static class DeleteWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]fields.delete"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]fields.delete"), WasmImportLinkage] internal static extern void wasmImportDelete(int p0, nint p1, int p2, nint p3); } @@ -883,39 +883,39 @@ internal unsafe void Delete(string name) var ptr = (nint)retAreaByte0; DeleteWasmInterop.wasmImportDelete(handle, interopString.ToInt32(), lengthresult, ptr); - Result lifted8; + Result lifted8; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted8 = Result.ok(new global::WasiHttpWorld.None()); + lifted8 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError lifted; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError lifted; switch (new Span((void*)(ptr + 1), 1)[0]) { case 0: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.invalidSyntax(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.invalidSyntax(); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.forbidden(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.forbidden(); break; } case 2: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.immutable(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.immutable(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 1), 1)[0]}"); } - lifted8 = Result.err(lifted); + lifted8 = Result.err(lifted); break; } @@ -934,7 +934,7 @@ internal unsafe void Delete(string name) internal static class AppendWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]fields.append"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]fields.append"), WasmImportLinkage] internal static extern void wasmImportAppend(int p0, nint p1, int p2, nint p3, int p4, nint p5); } @@ -955,39 +955,39 @@ internal unsafe void Append(string name, byte[] value) var ptr = (nint)retAreaByte0; AppendWasmInterop.wasmImportAppend(handle, interopString.ToInt32(), lengthresult, (int)buffer, (value).Length, ptr); - Result lifted8; + Result lifted8; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted8 = Result.ok(new global::WasiHttpWorld.None()); + lifted8 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError lifted; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError lifted; switch (new Span((void*)(ptr + 1), 1)[0]) { case 0: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.invalidSyntax(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.invalidSyntax(); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.forbidden(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.forbidden(); break; } case 2: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.HeaderError.immutable(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.HeaderError.immutable(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 1), 1)[0]}"); } - lifted8 = Result.err(lifted); + lifted8 = Result.err(lifted); break; } @@ -1006,7 +1006,7 @@ internal unsafe void Append(string name, byte[] value) internal static class EntriesWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]fields.entries"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]fields.entries"), WasmImportLinkage] internal static extern void wasmImportEntries(int p0, nint p1); } @@ -1039,16 +1039,16 @@ internal static class EntriesWasmInterop internal static class CloneWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]fields.clone"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]fields.clone"), WasmImportLinkage] internal static extern int wasmImportClone(int p0); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields Clone() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields Clone() { var handle = this.Handle; var result = CloneWasmInterop.wasmImportClone(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -1074,7 +1074,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]incoming-request"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]incoming-request"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -1090,12 +1090,12 @@ protected virtual void Dispose(bool disposing) { internal static class MethodWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-request.method"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-request.method"), WasmImportLinkage] internal static extern void wasmImportMethod(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method Method() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method Method() { var handle = this.Handle; @@ -1105,57 +1105,57 @@ internal static class MethodWasmInterop var ptr = (nint)retAreaByte0; MethodWasmInterop.wasmImportMethod(handle, ptr); - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method lifted; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method lifted; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.get(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.get(); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.head(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.head(); break; } case 2: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.post(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.post(); break; } case 3: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.put(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.put(); break; } case 4: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.delete(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.delete(); break; } case 5: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.connect(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.connect(); break; } case 6: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.options(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.options(); break; } case 7: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.trace(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.trace(); break; } case 8: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.patch(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.patch(); break; } case 9: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.other(Encoding.UTF8.GetString((byte*)BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)), BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.other(Encoding.UTF8.GetString((byte*)BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)), BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); break; } @@ -1169,7 +1169,7 @@ internal static class MethodWasmInterop internal static class PathWithQueryWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-request.path-with-query"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-request.path-with-query"), WasmImportLinkage] internal static extern void wasmImportPathWithQuery(int p0, nint p1); } @@ -1208,12 +1208,12 @@ internal static class PathWithQueryWasmInterop internal static class SchemeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-request.scheme"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-request.scheme"), WasmImportLinkage] internal static extern void wasmImportScheme(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme? Scheme() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme? Scheme() { var handle = this.Handle; @@ -1223,7 +1223,7 @@ internal static class SchemeWasmInterop var ptr = (nint)retAreaByte0; SchemeWasmInterop.wasmImportScheme(handle, ptr); - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme? lifted8; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme? lifted8; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { @@ -1233,22 +1233,22 @@ internal static class SchemeWasmInterop case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme lifted; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme.http(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme.http(); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme.https(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme.https(); break; } case 2: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme.other(Encoding.UTF8.GetString((byte*)BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)), BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme.other(Encoding.UTF8.GetString((byte*)BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)), BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); break; } @@ -1269,7 +1269,7 @@ internal static class SchemeWasmInterop internal static class AuthorityWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-request.authority"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-request.authority"), WasmImportLinkage] internal static extern void wasmImportAuthority(int p0, nint p1); } @@ -1308,16 +1308,16 @@ internal static class AuthorityWasmInterop internal static class HeadersWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-request.headers"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-request.headers"), WasmImportLinkage] internal static extern int wasmImportHeaders(int p0); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields Headers() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields Headers() { var handle = this.Handle; var result = HeadersWasmInterop.wasmImportHeaders(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -1325,12 +1325,12 @@ internal static class HeadersWasmInterop internal static class ConsumeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-request.consume"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-request.consume"), WasmImportLinkage] internal static extern void wasmImportConsume(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.IncomingBody Consume() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.IncomingBody Consume() { var handle = this.Handle; @@ -1340,18 +1340,18 @@ internal static class ConsumeWasmInterop var ptr = (nint)retAreaByte0; ConsumeWasmInterop.wasmImportConsume(handle, ptr); - Result lifted; + Result lifted; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.IncomingBody(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.IncomingBody.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.IncomingBody(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.IncomingBody.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); - lifted = Result.ok(resource); + lifted = Result.ok(resource); break; } case 1: { - lifted = Result.err(new global::WasiHttpWorld.None()); + lifted = Result.err(new global::WasiHttpWorld.None()); break; } @@ -1388,7 +1388,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]outgoing-request"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]outgoing-request"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -1404,12 +1404,12 @@ protected virtual void Dispose(bool disposing) { internal static class ConstructorWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[constructor]outgoing-request"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[constructor]outgoing-request"), WasmImportLinkage] internal static extern int wasmImportConstructor(int p0); } - internal unsafe OutgoingRequest(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields headers) + internal unsafe OutgoingRequest(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields headers) { var handle = headers.Handle; headers.Handle = 0; @@ -1421,12 +1421,12 @@ internal unsafe OutgoingRequest(global::WasiHttpWorld.wit.imports.wasi.http.v internal static class BodyWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.body"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.body"), WasmImportLinkage] internal static extern void wasmImportBody(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.OutgoingBody Body() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.OutgoingBody Body() { var handle = this.Handle; @@ -1436,18 +1436,18 @@ internal static class BodyWasmInterop var ptr = (nint)retAreaByte0; BodyWasmInterop.wasmImportBody(handle, ptr); - Result lifted; + Result lifted; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.OutgoingBody(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.OutgoingBody.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.OutgoingBody(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.OutgoingBody.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); - lifted = Result.ok(resource); + lifted = Result.ok(resource); break; } case 1: { - lifted = Result.err(new global::WasiHttpWorld.None()); + lifted = Result.err(new global::WasiHttpWorld.None()); break; } @@ -1466,12 +1466,12 @@ internal static class BodyWasmInterop internal static class MethodWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.method"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.method"), WasmImportLinkage] internal static extern void wasmImportMethod(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method Method() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method Method() { var handle = this.Handle; @@ -1481,57 +1481,57 @@ internal static class MethodWasmInterop var ptr = (nint)retAreaByte0; MethodWasmInterop.wasmImportMethod(handle, ptr); - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method lifted; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method lifted; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.get(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.get(); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.head(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.head(); break; } case 2: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.post(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.post(); break; } case 3: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.put(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.put(); break; } case 4: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.delete(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.delete(); break; } case 5: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.connect(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.connect(); break; } case 6: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.options(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.options(); break; } case 7: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.trace(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.trace(); break; } case 8: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.patch(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.patch(); break; } case 9: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method.other(Encoding.UTF8.GetString((byte*)BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)), BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method.other(Encoding.UTF8.GetString((byte*)BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)), BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); break; } @@ -1545,12 +1545,12 @@ internal static class MethodWasmInterop internal static class SetMethodWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.set-method"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.set-method"), WasmImportLinkage] internal static extern int wasmImportSetMethod(int p0, int p1, nint p2, int p3); } - internal unsafe void SetMethod(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Method method) + internal unsafe void SetMethod(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Method method) { var handle = this.Handle; @@ -1676,7 +1676,7 @@ internal unsafe void SetMethod(global::WasiHttpWorld.wit.imports.wasi.http.v0_ internal static class PathWithQueryWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.path-with-query"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.path-with-query"), WasmImportLinkage] internal static extern void wasmImportPathWithQuery(int p0, nint p1); } @@ -1715,7 +1715,7 @@ internal static class PathWithQueryWasmInterop internal static class SetPathWithQueryWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.set-path-with-query"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.set-path-with-query"), WasmImportLinkage] internal static extern int wasmImportSetPathWithQuery(int p0, int p1, nint p2, int p3); } @@ -1775,12 +1775,12 @@ internal unsafe void SetPathWithQuery(string? pathWithQuery) internal static class SchemeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.scheme"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.scheme"), WasmImportLinkage] internal static extern void wasmImportScheme(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme? Scheme() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme? Scheme() { var handle = this.Handle; @@ -1790,7 +1790,7 @@ internal static class SchemeWasmInterop var ptr = (nint)retAreaByte0; SchemeWasmInterop.wasmImportScheme(handle, ptr); - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme? lifted8; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme? lifted8; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { @@ -1800,22 +1800,22 @@ internal static class SchemeWasmInterop case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme lifted; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme.http(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme.http(); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme.https(); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme.https(); break; } case 2: { - lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme.other(Encoding.UTF8.GetString((byte*)BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)), BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); + lifted = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme.other(Encoding.UTF8.GetString((byte*)BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)), BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); break; } @@ -1836,12 +1836,12 @@ internal static class SchemeWasmInterop internal static class SetSchemeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.set-scheme"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.set-scheme"), WasmImportLinkage] internal static extern int wasmImportSetScheme(int p0, int p1, int p2, nint p3, int p4); } - internal unsafe void SetScheme(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme? scheme) + internal unsafe void SetScheme(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme? scheme) { var handle = this.Handle; @@ -1851,7 +1851,7 @@ internal unsafe void SetScheme(global::WasiHttpWorld.wit.imports.wasi.http.v0_ int lowered17; if (scheme != null) { - var payload2 = (global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Scheme) scheme; + var payload2 = (global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Scheme) scheme; int lowered; nint lowered12; @@ -1933,7 +1933,7 @@ internal unsafe void SetScheme(global::WasiHttpWorld.wit.imports.wasi.http.v0_ internal static class AuthorityWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.authority"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.authority"), WasmImportLinkage] internal static extern void wasmImportAuthority(int p0, nint p1); } @@ -1972,7 +1972,7 @@ internal static class AuthorityWasmInterop internal static class SetAuthorityWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.set-authority"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.set-authority"), WasmImportLinkage] internal static extern int wasmImportSetAuthority(int p0, int p1, nint p2, int p3); } @@ -2032,16 +2032,16 @@ internal unsafe void SetAuthority(string? authority) internal static class HeadersWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-request.headers"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-request.headers"), WasmImportLinkage] internal static extern int wasmImportHeaders(int p0); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields Headers() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields Headers() { var handle = this.Handle; var result = HeadersWasmInterop.wasmImportHeaders(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -2072,7 +2072,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]request-options"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]request-options"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -2088,7 +2088,7 @@ protected virtual void Dispose(bool disposing) { internal static class ConstructorWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[constructor]request-options"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[constructor]request-options"), WasmImportLinkage] internal static extern int wasmImportConstructor(); } @@ -2103,7 +2103,7 @@ internal unsafe RequestOptions() internal static class ConnectTimeoutWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]request-options.connect-timeout"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]request-options.connect-timeout"), WasmImportLinkage] internal static extern void wasmImportConnectTimeout(int p0, nint p1); } @@ -2142,7 +2142,7 @@ internal static class ConnectTimeoutWasmInterop internal static class SetConnectTimeoutWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]request-options.set-connect-timeout"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]request-options.set-connect-timeout"), WasmImportLinkage] internal static extern int wasmImportSetConnectTimeout(int p0, int p1, long p2); } @@ -2196,7 +2196,7 @@ internal unsafe void SetConnectTimeout(ulong? duration) internal static class FirstByteTimeoutWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]request-options.first-byte-timeout"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]request-options.first-byte-timeout"), WasmImportLinkage] internal static extern void wasmImportFirstByteTimeout(int p0, nint p1); } @@ -2235,7 +2235,7 @@ internal static class FirstByteTimeoutWasmInterop internal static class SetFirstByteTimeoutWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]request-options.set-first-byte-timeout"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]request-options.set-first-byte-timeout"), WasmImportLinkage] internal static extern int wasmImportSetFirstByteTimeout(int p0, int p1, long p2); } @@ -2289,7 +2289,7 @@ internal unsafe void SetFirstByteTimeout(ulong? duration) internal static class BetweenBytesTimeoutWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]request-options.between-bytes-timeout"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]request-options.between-bytes-timeout"), WasmImportLinkage] internal static extern void wasmImportBetweenBytesTimeout(int p0, nint p1); } @@ -2328,7 +2328,7 @@ internal static class BetweenBytesTimeoutWasmInterop internal static class SetBetweenBytesTimeoutWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]request-options.set-between-bytes-timeout"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]request-options.set-between-bytes-timeout"), WasmImportLinkage] internal static extern int wasmImportSetBetweenBytesTimeout(int p0, int p1, long p2); } @@ -2404,7 +2404,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]response-outparam"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]response-outparam"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -2420,12 +2420,12 @@ protected virtual void Dispose(bool disposing) { internal static class SetWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[static]response-outparam.set"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[static]response-outparam.set"), WasmImportLinkage] internal static extern void wasmImportSet(int p0, int p1, int p2, int p3, long p4, nint p5, nint p6, int p7, int p8); } - internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ResponseOutparam param, Result response) + internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ResponseOutparam param, Result response) { var handle = param.Handle; param.Handle = 0; @@ -2441,7 +2441,7 @@ internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_ switch (response.Tag) { case 0: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.OutgoingResponse payload = response.AsOk; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.OutgoingResponse payload = response.AsOk; var handle0 = payload.Handle; payload.Handle = 0; @@ -2457,7 +2457,7 @@ internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_ break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode payload3 = response.AsErr; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode payload3 = response.AsErr; int lowered325; int lowered326; @@ -2481,7 +2481,7 @@ internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_ break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.DnsErrorPayload payload9 = payload3.AsDnsError; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.DnsErrorPayload payload9 = payload3.AsDnsError; int lowered; nint lowered16; @@ -2676,7 +2676,7 @@ internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_ break; } case 14: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.TlsAlertReceivedPayload payload64 = payload3.AsTlsAlertReceived; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.TlsAlertReceivedPayload payload64 = payload3.AsTlsAlertReceived; int lowered71; int lowered72; @@ -2845,7 +2845,7 @@ internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_ break; } case 22: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload? payload123 = payload3.AsHttpRequestHeaderSize; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload? payload123 = payload3.AsHttpRequestHeaderSize; int lowered149; int lowered150; @@ -2855,7 +2855,7 @@ internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_ int lowered154; if (payload123 != null) { - var payload129 = (global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload) payload123; + var payload129 = (global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload) payload123; int lowered138; nint lowered139; @@ -2953,7 +2953,7 @@ internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_ break; } case 24: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload payload168 = payload3.AsHttpRequestTrailerSize; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload payload168 = payload3.AsHttpRequestTrailerSize; int lowered177; nint lowered178; @@ -3045,7 +3045,7 @@ internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_ break; } case 27: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload payload204 = payload3.AsHttpResponseHeaderSize; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload payload204 = payload3.AsHttpResponseHeaderSize; int lowered213; nint lowered214; @@ -3154,7 +3154,7 @@ internal static unsafe void Set(global::WasiHttpWorld.wit.imports.wasi.http.v0_ break; } case 30: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload payload248 = payload3.AsHttpResponseTrailerSize; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload payload248 = payload3.AsHttpResponseTrailerSize; int lowered257; nint lowered258; @@ -3412,7 +3412,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]incoming-response"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]incoming-response"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -3428,7 +3428,7 @@ protected virtual void Dispose(bool disposing) { internal static class StatusWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-response.status"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-response.status"), WasmImportLinkage] internal static extern int wasmImportStatus(int p0); } @@ -3444,16 +3444,16 @@ internal unsafe ushort Status() internal static class HeadersWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-response.headers"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-response.headers"), WasmImportLinkage] internal static extern int wasmImportHeaders(int p0); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields Headers() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields Headers() { var handle = this.Handle; var result = HeadersWasmInterop.wasmImportHeaders(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -3461,12 +3461,12 @@ internal static class HeadersWasmInterop internal static class ConsumeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-response.consume"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-response.consume"), WasmImportLinkage] internal static extern void wasmImportConsume(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.IncomingBody Consume() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.IncomingBody Consume() { var handle = this.Handle; @@ -3476,18 +3476,18 @@ internal static class ConsumeWasmInterop var ptr = (nint)retAreaByte0; ConsumeWasmInterop.wasmImportConsume(handle, ptr); - Result lifted; + Result lifted; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.IncomingBody(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.IncomingBody.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.IncomingBody(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.IncomingBody.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); - lifted = Result.ok(resource); + lifted = Result.ok(resource); break; } case 1: { - lifted = Result.err(new global::WasiHttpWorld.None()); + lifted = Result.err(new global::WasiHttpWorld.None()); break; } @@ -3531,7 +3531,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]incoming-body"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]incoming-body"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -3547,12 +3547,12 @@ protected virtual void Dispose(bool disposing) { internal static class StreamWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]incoming-body.stream"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]incoming-body.stream"), WasmImportLinkage] internal static extern void wasmImportStream(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.InputStream Stream() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.InputStream Stream() { var handle = this.Handle; @@ -3562,18 +3562,18 @@ internal static class StreamWasmInterop var ptr = (nint)retAreaByte0; StreamWasmInterop.wasmImportStream(handle, ptr); - Result lifted; + Result lifted; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.InputStream(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.InputStream.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.InputStream(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.InputStream.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); - lifted = Result.ok(resource); + lifted = Result.ok(resource); break; } case 1: { - lifted = Result.err(new global::WasiHttpWorld.None()); + lifted = Result.err(new global::WasiHttpWorld.None()); break; } @@ -3592,17 +3592,17 @@ internal static class StreamWasmInterop internal static class FinishWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[static]incoming-body.finish"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[static]incoming-body.finish"), WasmImportLinkage] internal static extern int wasmImportFinish(int p0); } - internal static unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FutureTrailers Finish(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.IncomingBody @this) + internal static unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FutureTrailers Finish(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.IncomingBody @this) { var handle = @this.Handle; @this.Handle = 0; var result = FinishWasmInterop.wasmImportFinish(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FutureTrailers(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FutureTrailers.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FutureTrailers(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FutureTrailers.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -3611,7 +3611,7 @@ internal static class FinishWasmInterop } /** - * Represents a future which may eventually return trailers, or an error. + * Represents a future which may eventaully return trailers, or an error. * * In the case that the incoming HTTP Request or Response did not have any * trailers, this future will resolve to the empty set of trailers once the @@ -3632,7 +3632,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]future-trailers"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]future-trailers"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -3648,16 +3648,16 @@ protected virtual void Dispose(bool disposing) { internal static class SubscribeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]future-trailers.subscribe"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]future-trailers.subscribe"), WasmImportLinkage] internal static extern int wasmImportSubscribe(int p0); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable Subscribe() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable Subscribe() { var handle = this.Handle; var result = SubscribeWasmInterop.wasmImportSubscribe(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -3665,12 +3665,12 @@ internal static class SubscribeWasmInterop internal static class GetWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]future-trailers.get"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]future-trailers.get"), WasmImportLinkage] internal static extern void wasmImportGet(int p0, nint p1); } - internal unsafe Result, None>? Get() + internal unsafe Result, None>? Get() { var handle = this.Handle; @@ -3680,7 +3680,7 @@ internal static class GetWasmInterop var ptr = (nint)retAreaByte0; GetWasmInterop.wasmImportGet(handle, ptr); - Result, None>? lifted205; + Result, None>? lifted205; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { @@ -3690,17 +3690,17 @@ internal static class GetWasmInterop case 1: { - Result, None> lifted204; + Result, None> lifted204; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - Result lifted201; + Result lifted201; switch (new Span((void*)(ptr + 16), 1)[0]) { case 0: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields? lifted; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields? lifted; switch (new Span((void*)(ptr + 24), 1)[0]) { case 0: { @@ -3709,7 +3709,7 @@ internal static class GetWasmInterop } case 1: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 28), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 28), 4)))); lifted = resource; break; @@ -3718,17 +3718,17 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 24), 1)[0])); } - lifted201 = Result.ok(lifted); + lifted201 = Result.ok(lifted); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode lifted200; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode lifted200; switch (new Span((void*)(ptr + 24), 1)[0]) { case 0: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsTimeout(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsTimeout(); break; } case 1: { @@ -3767,68 +3767,68 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 44), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.DnsErrorPayload ( + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.DnsErrorPayload ( lifted20, lifted25)); break; } case 2: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationNotFound(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationNotFound(); break; } case 3: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationUnavailable(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationUnavailable(); break; } case 4: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpProhibited(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpProhibited(); break; } case 5: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpUnroutable(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpUnroutable(); break; } case 6: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionRefused(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionRefused(); break; } case 7: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTerminated(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTerminated(); break; } case 8: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTimeout(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTimeout(); break; } case 9: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionReadTimeout(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionReadTimeout(); break; } case 10: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionWriteTimeout(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionWriteTimeout(); break; } case 11: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionLimitReached(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionLimitReached(); break; } case 12: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsProtocolError(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsProtocolError(); break; } case 13: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsCertificateError(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsCertificateError(); break; } case 14: { @@ -3867,18 +3867,18 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 36), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.TlsAlertReceivedPayload ( + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.TlsAlertReceivedPayload ( lifted56, lifted61)); break; } case 15: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestDenied(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestDenied(); break; } case 16: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestLengthRequired(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestLengthRequired(); break; } case 17: { @@ -3900,22 +3900,22 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestBodySize(lifted72); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestBodySize(lifted72); break; } case 18: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestMethodInvalid(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestMethodInvalid(); break; } case 19: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriInvalid(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriInvalid(); break; } case 20: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriTooLong(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriTooLong(); break; } case 21: { @@ -3937,12 +3937,12 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted85); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted85); break; } case 22: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload? lifted102; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload? lifted102; switch (new Span((void*)(ptr + 32), 1)[0]) { case 0: { @@ -3986,7 +3986,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 48), 1)[0])); } - lifted102 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted102 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted96, lifted101); break; } @@ -3994,7 +3994,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSize(lifted102); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSize(lifted102); break; } case 23: { @@ -4016,7 +4016,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted109); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted109); break; } case 24: { @@ -4055,13 +4055,13 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 44), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted116, lifted121)); break; } case 25: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseIncomplete(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseIncomplete(); break; } case 26: { @@ -4083,7 +4083,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted130); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted130); break; } case 27: { @@ -4122,7 +4122,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 44), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted137, lifted142)); break; } @@ -4145,7 +4145,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseBodySize(lifted149); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseBodySize(lifted149); break; } case 29: { @@ -4167,7 +4167,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted156); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted156); break; } case 30: { @@ -4206,7 +4206,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 44), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted163, lifted168)); break; } @@ -4229,7 +4229,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTransferCoding(lifted175); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTransferCoding(lifted175); break; } case 32: { @@ -4251,32 +4251,32 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseContentCoding(lifted182); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseContentCoding(lifted182); break; } case 33: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTimeout(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTimeout(); break; } case 34: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpUpgradeFailed(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpUpgradeFailed(); break; } case 35: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpProtocolError(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpProtocolError(); break; } case 36: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.loopDetected(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.loopDetected(); break; } case 37: { - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.configurationError(); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.configurationError(); break; } case 38: { @@ -4298,26 +4298,26 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.internalError(lifted199); + lifted200 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.internalError(lifted199); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 24), 1)[0]}"); } - lifted201 = Result.err(lifted200); + lifted201 = Result.err(lifted200); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 16), 1)[0]}"); } - lifted204 = Result, None>.ok(lifted201); + lifted204 = Result, None>.ok(lifted201); break; } case 1: { - lifted204 = Result, None>.err(new global::WasiHttpWorld.None()); + lifted204 = Result, None>.err(new global::WasiHttpWorld.None()); break; } @@ -4356,7 +4356,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]outgoing-response"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]outgoing-response"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -4372,12 +4372,12 @@ protected virtual void Dispose(bool disposing) { internal static class ConstructorWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[constructor]outgoing-response"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[constructor]outgoing-response"), WasmImportLinkage] internal static extern int wasmImportConstructor(int p0); } - internal unsafe OutgoingResponse(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields headers) + internal unsafe OutgoingResponse(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields headers) { var handle = headers.Handle; headers.Handle = 0; @@ -4389,7 +4389,7 @@ internal unsafe OutgoingResponse(global::WasiHttpWorld.wit.imports.wasi.http. internal static class StatusCodeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-response.status-code"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-response.status-code"), WasmImportLinkage] internal static extern int wasmImportStatusCode(int p0); } @@ -4405,7 +4405,7 @@ internal unsafe ushort StatusCode() internal static class SetStatusCodeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-response.set-status-code"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-response.set-status-code"), WasmImportLinkage] internal static extern int wasmImportSetStatusCode(int p0, int p1); } @@ -4443,16 +4443,16 @@ internal unsafe void SetStatusCode(ushort statusCode) internal static class HeadersWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-response.headers"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-response.headers"), WasmImportLinkage] internal static extern int wasmImportHeaders(int p0); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields Headers() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields Headers() { var handle = this.Handle; var result = HeadersWasmInterop.wasmImportHeaders(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -4460,12 +4460,12 @@ internal static class HeadersWasmInterop internal static class BodyWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-response.body"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-response.body"), WasmImportLinkage] internal static extern void wasmImportBody(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.OutgoingBody Body() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.OutgoingBody Body() { var handle = this.Handle; @@ -4475,18 +4475,18 @@ internal static class BodyWasmInterop var ptr = (nint)retAreaByte0; BodyWasmInterop.wasmImportBody(handle, ptr); - Result lifted; + Result lifted; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.OutgoingBody(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.OutgoingBody.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.OutgoingBody(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.OutgoingBody.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); - lifted = Result.ok(resource); + lifted = Result.ok(resource); break; } case 1: { - lifted = Result.err(new global::WasiHttpWorld.None()); + lifted = Result.err(new global::WasiHttpWorld.None()); break; } @@ -4518,7 +4518,7 @@ internal static class BodyWasmInterop * * If the user code drops this resource, as opposed to calling the static * method `finish`, the implementation should treat the body as incomplete, - * and that an error has occurred. The implementation should propagate this + * and that an error has occured. The implementation should propogate this * error to the HTTP protocol by whatever means it has available, * including: corrupting the body on the wire, aborting the associated * Request, or sending a late status code for the Response. @@ -4538,7 +4538,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]outgoing-body"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]outgoing-body"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -4554,12 +4554,12 @@ protected virtual void Dispose(bool disposing) { internal static class WriteWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]outgoing-body.write"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]outgoing-body.write"), WasmImportLinkage] internal static extern void wasmImportWrite(int p0, nint p1); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.OutputStream Write() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.OutputStream Write() { var handle = this.Handle; @@ -4569,18 +4569,18 @@ internal static class WriteWasmInterop var ptr = (nint)retAreaByte0; WriteWasmInterop.wasmImportWrite(handle, ptr); - Result lifted; + Result lifted; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.OutputStream(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.OutputStream.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.OutputStream(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.OutputStream.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4)))); - lifted = Result.ok(resource); + lifted = Result.ok(resource); break; } case 1: { - lifted = Result.err(new global::WasiHttpWorld.None()); + lifted = Result.err(new global::WasiHttpWorld.None()); break; } @@ -4599,12 +4599,12 @@ internal static class WriteWasmInterop internal static class FinishWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[static]outgoing-body.finish"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[static]outgoing-body.finish"), WasmImportLinkage] internal static extern void wasmImportFinish(int p0, int p1, int p2, nint p3); } - internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.OutgoingBody @this, global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields? trailers) + internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.OutgoingBody @this, global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields? trailers) { var handle = @this.Handle; @this.Handle = 0; @@ -4613,7 +4613,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. int lowered4; if (trailers != null) { - var payload2 = (global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.Fields) trailers; + var payload2 = (global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.Fields) trailers; var handle3 = payload2.Handle; payload2.Handle = 0; @@ -4633,22 +4633,22 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. var ptr = (nint)retAreaByte0; FinishWasmInterop.wasmImportFinish(handle, lowered, lowered4, ptr); - Result lifted197; + Result lifted197; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted197 = Result.ok(new global::WasiHttpWorld.None()); + lifted197 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode lifted196; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode lifted196; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsTimeout(); break; } case 1: { @@ -4687,68 +4687,68 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.DnsErrorPayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.DnsErrorPayload ( lifted, lifted21)); break; } case 2: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationNotFound(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationNotFound(); break; } case 3: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationUnavailable(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationUnavailable(); break; } case 4: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpProhibited(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpProhibited(); break; } case 5: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpUnroutable(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpUnroutable(); break; } case 6: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionRefused(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionRefused(); break; } case 7: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTerminated(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTerminated(); break; } case 8: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTimeout(); break; } case 9: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionReadTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionReadTimeout(); break; } case 10: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionWriteTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionWriteTimeout(); break; } case 11: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionLimitReached(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionLimitReached(); break; } case 12: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsProtocolError(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsProtocolError(); break; } case 13: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsCertificateError(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsCertificateError(); break; } case 14: { @@ -4787,18 +4787,18 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 20), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.TlsAlertReceivedPayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.TlsAlertReceivedPayload ( lifted52, lifted57)); break; } case 15: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestDenied(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestDenied(); break; } case 16: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestLengthRequired(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestLengthRequired(); break; } case 17: { @@ -4820,22 +4820,22 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestBodySize(lifted68); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestBodySize(lifted68); break; } case 18: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestMethodInvalid(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestMethodInvalid(); break; } case 19: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriInvalid(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriInvalid(); break; } case 20: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriTooLong(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriTooLong(); break; } case 21: { @@ -4857,12 +4857,12 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted81); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted81); break; } case 22: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload? lifted98; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload? lifted98; switch (new Span((void*)(ptr + 16), 1)[0]) { case 0: { @@ -4906,7 +4906,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted98 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted98 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted92, lifted97); break; } @@ -4914,7 +4914,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSize(lifted98); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSize(lifted98); break; } case 23: { @@ -4936,7 +4936,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted105); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted105); break; } case 24: { @@ -4975,13 +4975,13 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted112, lifted117)); break; } case 25: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseIncomplete(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseIncomplete(); break; } case 26: { @@ -5003,7 +5003,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted126); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted126); break; } case 27: { @@ -5042,7 +5042,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted133, lifted138)); break; } @@ -5065,7 +5065,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseBodySize(lifted145); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseBodySize(lifted145); break; } case 29: { @@ -5087,7 +5087,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted152); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted152); break; } case 30: { @@ -5126,7 +5126,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted159, lifted164)); break; } @@ -5149,7 +5149,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTransferCoding(lifted171); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTransferCoding(lifted171); break; } case 32: { @@ -5171,32 +5171,32 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseContentCoding(lifted178); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseContentCoding(lifted178); break; } case 33: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTimeout(); break; } case 34: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpUpgradeFailed(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpUpgradeFailed(); break; } case 35: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpProtocolError(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpProtocolError(); break; } case 36: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.loopDetected(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.loopDetected(); break; } case 37: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.configurationError(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.configurationError(); break; } case 38: { @@ -5218,14 +5218,14 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.internalError(lifted195); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.internalError(lifted195); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 8), 1)[0]}"); } - lifted197 = Result.err(lifted196); + lifted197 = Result.err(lifted196); break; } @@ -5245,7 +5245,7 @@ internal static unsafe void Finish(global::WasiHttpWorld.wit.imports.wasi.http. } /** - * Represents a future which may eventually return an incoming HTTP + * Represents a future which may eventaully return an incoming HTTP * Response, or an error. * * This resource is returned by the `wasi:http/outgoing-handler` interface to @@ -5266,7 +5266,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[resource-drop]future-incoming-response"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[resource-drop]future-incoming-response"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -5282,16 +5282,16 @@ protected virtual void Dispose(bool disposing) { internal static class SubscribeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]future-incoming-response.subscribe"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]future-incoming-response.subscribe"), WasmImportLinkage] internal static extern int wasmImportSubscribe(int p0); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable Subscribe() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable Subscribe() { var handle = this.Handle; var result = SubscribeWasmInterop.wasmImportSubscribe(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -5299,12 +5299,12 @@ internal static class SubscribeWasmInterop internal static class GetWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "[method]future-incoming-response.get"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "[method]future-incoming-response.get"), WasmImportLinkage] internal static extern void wasmImportGet(int p0, nint p1); } - internal unsafe Result, None>? Get() + internal unsafe Result, None>? Get() { var handle = this.Handle; @@ -5314,7 +5314,7 @@ internal static class GetWasmInterop var ptr = (nint)retAreaByte0; GetWasmInterop.wasmImportGet(handle, ptr); - Result, None>? lifted200; + Result, None>? lifted200; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { @@ -5324,28 +5324,28 @@ internal static class GetWasmInterop case 1: { - Result, None> lifted199; + Result, None> lifted199; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - Result lifted196; + Result lifted196; switch (new Span((void*)(ptr + 16), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.IncomingResponse(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.IncomingResponse.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 24), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.IncomingResponse(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.IncomingResponse.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 24), 4)))); - lifted196 = Result.ok(resource); + lifted196 = Result.ok(resource); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode lifted195; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode lifted195; switch (new Span((void*)(ptr + 24), 1)[0]) { case 0: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsTimeout(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsTimeout(); break; } case 1: { @@ -5384,68 +5384,68 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 44), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.DnsErrorPayload ( + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.DnsErrorPayload ( lifted, lifted20)); break; } case 2: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationNotFound(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationNotFound(); break; } case 3: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationUnavailable(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationUnavailable(); break; } case 4: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpProhibited(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpProhibited(); break; } case 5: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpUnroutable(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpUnroutable(); break; } case 6: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionRefused(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionRefused(); break; } case 7: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTerminated(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTerminated(); break; } case 8: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTimeout(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTimeout(); break; } case 9: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionReadTimeout(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionReadTimeout(); break; } case 10: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionWriteTimeout(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionWriteTimeout(); break; } case 11: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionLimitReached(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionLimitReached(); break; } case 12: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsProtocolError(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsProtocolError(); break; } case 13: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsCertificateError(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsCertificateError(); break; } case 14: { @@ -5484,18 +5484,18 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 36), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.TlsAlertReceivedPayload ( + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.TlsAlertReceivedPayload ( lifted51, lifted56)); break; } case 15: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestDenied(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestDenied(); break; } case 16: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestLengthRequired(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestLengthRequired(); break; } case 17: { @@ -5517,22 +5517,22 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestBodySize(lifted67); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestBodySize(lifted67); break; } case 18: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestMethodInvalid(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestMethodInvalid(); break; } case 19: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriInvalid(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriInvalid(); break; } case 20: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriTooLong(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriTooLong(); break; } case 21: { @@ -5554,12 +5554,12 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted80); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted80); break; } case 22: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload? lifted97; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload? lifted97; switch (new Span((void*)(ptr + 32), 1)[0]) { case 0: { @@ -5603,7 +5603,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 48), 1)[0])); } - lifted97 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted97 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted91, lifted96); break; } @@ -5611,7 +5611,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSize(lifted97); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSize(lifted97); break; } case 23: { @@ -5633,7 +5633,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted104); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted104); break; } case 24: { @@ -5672,13 +5672,13 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 44), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted111, lifted116)); break; } case 25: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseIncomplete(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseIncomplete(); break; } case 26: { @@ -5700,7 +5700,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted125); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted125); break; } case 27: { @@ -5739,7 +5739,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 44), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted132, lifted137)); break; } @@ -5762,7 +5762,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseBodySize(lifted144); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseBodySize(lifted144); break; } case 29: { @@ -5784,7 +5784,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted151); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted151); break; } case 30: { @@ -5823,7 +5823,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 44), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted158, lifted163)); break; } @@ -5846,7 +5846,7 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTransferCoding(lifted170); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTransferCoding(lifted170); break; } case 32: { @@ -5868,32 +5868,32 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseContentCoding(lifted177); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseContentCoding(lifted177); break; } case 33: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTimeout(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTimeout(); break; } case 34: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpUpgradeFailed(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpUpgradeFailed(); break; } case 35: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpProtocolError(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpProtocolError(); break; } case 36: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.loopDetected(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.loopDetected(); break; } case 37: { - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.configurationError(); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.configurationError(); break; } case 38: { @@ -5915,26 +5915,26 @@ internal static class GetWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.internalError(lifted194); + lifted195 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.internalError(lifted194); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 24), 1)[0]}"); } - lifted196 = Result.err(lifted195); + lifted196 = Result.err(lifted195); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 16), 1)[0]}"); } - lifted199 = Result, None>.ok(lifted196); + lifted199 = Result, None>.ok(lifted196); break; } case 1: { - lifted199 = Result, None>.err(new global::WasiHttpWorld.None()); + lifted199 = Result, None>.err(new global::WasiHttpWorld.None()); break; } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.OutgoingHandlerInterop.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_0.OutgoingHandlerInterop.cs similarity index 87% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.OutgoingHandlerInterop.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_0.OutgoingHandlerInterop.cs index 10aba859a4b..9d1704790c3 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.OutgoingHandlerInterop.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_0.OutgoingHandlerInterop.cs @@ -11,18 +11,18 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.http.v0_2_1 +namespace WasiHttpWorld.wit.imports.wasi.http.v0_2_0 { internal static class OutgoingHandlerInterop { internal static class HandleWasmInterop { - [DllImport("wasi:http/outgoing-handler@0.2.1", EntryPoint = "handle"), WasmImportLinkage] + [DllImport("wasi:http/outgoing-handler@0.2.0", EntryPoint = "handle"), WasmImportLinkage] internal static extern void wasmImportHandle(int p0, int p1, int p2, nint p3); } - internal static unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FutureIncomingResponse Handle(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.OutgoingRequest request, global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.RequestOptions? options) + internal static unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FutureIncomingResponse Handle(global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.OutgoingRequest request, global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.RequestOptions? options) { var handle = request.Handle; request.Handle = 0; @@ -31,7 +31,7 @@ internal static class HandleWasmInterop int lowered4; if (options != null) { - var payload2 = (global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.RequestOptions) options; + var payload2 = (global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.RequestOptions) options; var handle3 = payload2.Handle; payload2.Handle = 0; @@ -51,23 +51,23 @@ internal static class HandleWasmInterop var ptr = (nint)retAreaByte0; HandleWasmInterop.wasmImportHandle(handle, lowered, lowered4, ptr); - Result lifted197; + Result lifted197; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FutureIncomingResponse(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FutureIncomingResponse.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FutureIncomingResponse(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FutureIncomingResponse.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); - lifted197 = Result.ok(resource); + lifted197 = Result.ok(resource); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode lifted196; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode lifted196; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsTimeout(); break; } case 1: { @@ -106,68 +106,68 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.DnsErrorPayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.DnsErrorPayload ( lifted, lifted21)); break; } case 2: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationNotFound(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationNotFound(); break; } case 3: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationUnavailable(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationUnavailable(); break; } case 4: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpProhibited(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpProhibited(); break; } case 5: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpUnroutable(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpUnroutable(); break; } case 6: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionRefused(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionRefused(); break; } case 7: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTerminated(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTerminated(); break; } case 8: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTimeout(); break; } case 9: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionReadTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionReadTimeout(); break; } case 10: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionWriteTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionWriteTimeout(); break; } case 11: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionLimitReached(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionLimitReached(); break; } case 12: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsProtocolError(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsProtocolError(); break; } case 13: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsCertificateError(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsCertificateError(); break; } case 14: { @@ -206,18 +206,18 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 20), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.TlsAlertReceivedPayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.TlsAlertReceivedPayload ( lifted52, lifted57)); break; } case 15: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestDenied(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestDenied(); break; } case 16: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestLengthRequired(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestLengthRequired(); break; } case 17: { @@ -239,22 +239,22 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestBodySize(lifted68); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestBodySize(lifted68); break; } case 18: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestMethodInvalid(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestMethodInvalid(); break; } case 19: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriInvalid(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriInvalid(); break; } case 20: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriTooLong(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriTooLong(); break; } case 21: { @@ -276,12 +276,12 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted81); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted81); break; } case 22: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload? lifted98; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload? lifted98; switch (new Span((void*)(ptr + 16), 1)[0]) { case 0: { @@ -325,7 +325,7 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted98 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted98 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted92, lifted97); break; } @@ -333,7 +333,7 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSize(lifted98); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSize(lifted98); break; } case 23: { @@ -355,7 +355,7 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted105); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted105); break; } case 24: { @@ -394,13 +394,13 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted112, lifted117)); break; } case 25: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseIncomplete(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseIncomplete(); break; } case 26: { @@ -422,7 +422,7 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted126); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted126); break; } case 27: { @@ -461,7 +461,7 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted133, lifted138)); break; } @@ -484,7 +484,7 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseBodySize(lifted145); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseBodySize(lifted145); break; } case 29: { @@ -506,7 +506,7 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted152); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted152); break; } case 30: { @@ -545,7 +545,7 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted159, lifted164)); break; } @@ -568,7 +568,7 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTransferCoding(lifted171); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTransferCoding(lifted171); break; } case 32: { @@ -590,32 +590,32 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseContentCoding(lifted178); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseContentCoding(lifted178); break; } case 33: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTimeout(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTimeout(); break; } case 34: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpUpgradeFailed(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpUpgradeFailed(); break; } case 35: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpProtocolError(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpProtocolError(); break; } case 36: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.loopDetected(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.loopDetected(); break; } case 37: { - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.configurationError(); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.configurationError(); break; } case 38: { @@ -637,14 +637,14 @@ internal static class HandleWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.internalError(lifted195); + lifted196 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.internalError(lifted195); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 8), 1)[0]}"); } - lifted197 = Result.err(lifted196); + lifted197 = Result.err(lifted196); break; } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.TypesInterop.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_0.TypesInterop.cs similarity index 89% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.TypesInterop.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_0.TypesInterop.cs index 121f6cfdd50..30c2d2bb7fb 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_1.TypesInterop.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.http.v0_2_0.TypesInterop.cs @@ -11,18 +11,18 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.http.v0_2_1 +namespace WasiHttpWorld.wit.imports.wasi.http.v0_2_0 { internal static class TypesInterop { internal static class HttpErrorCodeWasmInterop { - [DllImport("wasi:http/types@0.2.1", EntryPoint = "http-error-code"), WasmImportLinkage] + [DllImport("wasi:http/types@0.2.0", EntryPoint = "http-error-code"), WasmImportLinkage] internal static extern void wasmImportHttpErrorCode(int p0, nint p1); } - internal static unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode? HttpErrorCode(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error err) + internal static unsafe global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode? HttpErrorCode(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error err) { var handle = err.Handle; @@ -32,7 +32,7 @@ internal static class HttpErrorCodeWasmInterop var ptr = (nint)retAreaByte0; HttpErrorCodeWasmInterop.wasmImportHttpErrorCode(handle, ptr); - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode? lifted190; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode? lifted190; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { @@ -42,12 +42,12 @@ internal static class HttpErrorCodeWasmInterop case 1: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode lifted189; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode lifted189; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsTimeout(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsTimeout(); break; } case 1: { @@ -86,68 +86,68 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.DnsErrorPayload ( + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.dnsError(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.DnsErrorPayload ( lifted, lifted14)); break; } case 2: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationNotFound(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationNotFound(); break; } case 3: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationUnavailable(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationUnavailable(); break; } case 4: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpProhibited(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpProhibited(); break; } case 5: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.destinationIpUnroutable(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.destinationIpUnroutable(); break; } case 6: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionRefused(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionRefused(); break; } case 7: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTerminated(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTerminated(); break; } case 8: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionTimeout(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionTimeout(); break; } case 9: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionReadTimeout(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionReadTimeout(); break; } case 10: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionWriteTimeout(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionWriteTimeout(); break; } case 11: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.connectionLimitReached(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.connectionLimitReached(); break; } case 12: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsProtocolError(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsProtocolError(); break; } case 13: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsCertificateError(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsCertificateError(); break; } case 14: { @@ -186,18 +186,18 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 20), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.TlsAlertReceivedPayload ( + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.tlsAlertReceived(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.TlsAlertReceivedPayload ( lifted45, lifted50)); break; } case 15: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestDenied(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestDenied(); break; } case 16: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestLengthRequired(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestLengthRequired(); break; } case 17: { @@ -219,22 +219,22 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestBodySize(lifted61); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestBodySize(lifted61); break; } case 18: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestMethodInvalid(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestMethodInvalid(); break; } case 19: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriInvalid(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriInvalid(); break; } case 20: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestUriTooLong(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestUriTooLong(); break; } case 21: { @@ -256,12 +256,12 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted74); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSectionSize(lifted74); break; } case 22: { - global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload? lifted91; + global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload? lifted91; switch (new Span((void*)(ptr + 16), 1)[0]) { case 0: { @@ -305,7 +305,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 32), 1)[0])); } - lifted91 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted91 = new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted85, lifted90); break; } @@ -313,7 +313,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestHeaderSize(lifted91); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestHeaderSize(lifted91); break; } case 23: { @@ -335,7 +335,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted98); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSectionSize(lifted98); break; } case 24: { @@ -374,13 +374,13 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpRequestTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted105, lifted110)); break; } case 25: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseIncomplete(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseIncomplete(); break; } case 26: { @@ -402,7 +402,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted119); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSectionSize(lifted119); break; } case 27: { @@ -441,7 +441,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseHeaderSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted126, lifted131)); break; } @@ -464,7 +464,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseBodySize(lifted138); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseBodySize(lifted138); break; } case 29: { @@ -486,7 +486,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted145); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSectionSize(lifted145); break; } case 30: { @@ -525,7 +525,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 28), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.FieldSizePayload ( + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTrailerSize(new global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.FieldSizePayload ( lifted152, lifted157)); break; } @@ -548,7 +548,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTransferCoding(lifted164); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTransferCoding(lifted164); break; } case 32: { @@ -570,32 +570,32 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseContentCoding(lifted171); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseContentCoding(lifted171); break; } case 33: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpResponseTimeout(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpResponseTimeout(); break; } case 34: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpUpgradeFailed(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpUpgradeFailed(); break; } case 35: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.httpProtocolError(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.httpProtocolError(); break; } case 36: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.loopDetected(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.loopDetected(); break; } case 37: { - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.configurationError(); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.configurationError(); break; } case 38: { @@ -617,7 +617,7 @@ internal static class HttpErrorCodeWasmInterop default: throw new ArgumentException("invalid discriminant: " + (new Span((void*)(ptr + 16), 1)[0])); } - lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.ErrorCode.internalError(lifted188); + lifted189 = global::WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.ErrorCode.internalError(lifted188); break; } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.ErrorInterop.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.ErrorInterop.cs similarity index 88% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.ErrorInterop.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.ErrorInterop.cs index 2c3246555fc..6ffcbd423bc 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.ErrorInterop.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.ErrorInterop.cs @@ -11,7 +11,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_1 +namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_0 { internal static class ErrorInterop { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.cs similarity index 81% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.cs index 3621e1c1fd3..8541f3afb64 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.cs @@ -11,7 +11,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_1; +namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_0; internal interface IError { @@ -25,11 +25,13 @@ internal interface IError { * `wasi:io/streams/stream-error` type. * * To provide more specific error information, other interfaces may - * offer functions to "downcast" this error into more specific types. For example, - * errors returned from streams derived from filesystem types can be described using - * the filesystem's own error-code type. This is done using the function - * `wasi:filesystem/types/filesystem-error-code`, which takes a `borrow<error>` - * parameter and returns an `option<wasi:filesystem/types/error-code>`. + * provide functions to further "downcast" this error into more specific + * error information. For example, `error`s returned in streams derived + * from filesystem types to be described using the filesystem's own + * error-code type, using the function + * `wasi:filesystem/types/filesystem-error-code`, which takes a parameter + * `borrow<error>` and returns + * `option<wasi:filesystem/types/error-code>`. * * The set of functions which can "downcast" an `error` into a more * concrete type is open. @@ -49,7 +51,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:io/error@0.2.1", EntryPoint = "[resource-drop]error"), WasmImportLinkage] + [DllImport("wasi:io/error@0.2.0", EntryPoint = "[resource-drop]error"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -65,7 +67,7 @@ protected virtual void Dispose(bool disposing) { internal static class ToDebugStringWasmInterop { - [DllImport("wasi:io/error@0.2.1", EntryPoint = "[method]error.to-debug-string"), WasmImportLinkage] + [DllImport("wasi:io/error@0.2.0", EntryPoint = "[method]error.to-debug-string"), WasmImportLinkage] internal static extern void wasmImportToDebugString(int p0, nint p1); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_1.IPoll.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.cs similarity index 89% rename from src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_1.IPoll.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.cs index 8ad5cabf64b..438a4ffcfd6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_1.IPoll.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.cs @@ -11,7 +11,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiPollWorld.wit.imports.wasi.io.v0_2_1; +namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_0; internal interface IPoll { @@ -33,7 +33,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:io/poll@0.2.1", EntryPoint = "[resource-drop]pollable"), WasmImportLinkage] + [DllImport("wasi:io/poll@0.2.0", EntryPoint = "[resource-drop]pollable"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -49,7 +49,7 @@ protected virtual void Dispose(bool disposing) { internal static class ReadyWasmInterop { - [DllImport("wasi:io/poll@0.2.1", EntryPoint = "[method]pollable.ready"), WasmImportLinkage] + [DllImport("wasi:io/poll@0.2.0", EntryPoint = "[method]pollable.ready"), WasmImportLinkage] internal static extern int wasmImportReady(int p0); } @@ -65,7 +65,7 @@ internal unsafe bool Ready() internal static class BlockWasmInterop { - [DllImport("wasi:io/poll@0.2.1", EntryPoint = "[method]pollable.block"), WasmImportLinkage] + [DllImport("wasi:io/poll@0.2.0", EntryPoint = "[method]pollable.block"), WasmImportLinkage] internal static extern void wasmImportBlock(int p0); } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.cs similarity index 81% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.cs index ab775cbfeb0..6afb0056ed7 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.cs @@ -11,7 +11,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_1; +namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_0; internal interface IStreams { @@ -28,7 +28,7 @@ private StreamError(byte tag, object? value) { this.value = value; } - internal static StreamError lastOperationFailed(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error lastOperationFailed) { + internal static StreamError lastOperationFailed(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error lastOperationFailed) { return new StreamError(LAST_OPERATION_FAILED, lastOperationFailed); } @@ -36,12 +36,12 @@ internal static StreamError closed() { return new StreamError(CLOSED, null); } - internal global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error AsLastOperationFailed + internal global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error AsLastOperationFailed { get { if (Tag == LAST_OPERATION_FAILED) - return (global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error)value!; + return (global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error)value!; else throw new ArgumentException("expected LAST_OPERATION_FAILED, got " + Tag); } @@ -76,7 +76,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[resource-drop]input-stream"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[resource-drop]input-stream"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -92,7 +92,7 @@ protected virtual void Dispose(bool disposing) { internal static class ReadWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]input-stream.read"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]input-stream.read"), WasmImportLinkage] internal static extern void wasmImportRead(int p0, long p1, nint p2); } @@ -107,7 +107,7 @@ internal unsafe byte[] Read(ulong len) var ptr = (nint)retAreaByte0; ReadWasmInterop.wasmImportRead(handle, unchecked((long)(len)), ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { @@ -115,30 +115,30 @@ internal unsafe byte[] Read(ulong len) var array = new byte[BitConverter.ToInt32(new Span((void*)(ptr + 8), 4))]; new Span((void*)(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4))), BitConverter.ToInt32(new Span((void*)(ptr + 8), 4))).CopyTo(new Span(array)); - lifted6 = Result.ok(array); + lifted6 = Result.ok(array); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 4), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -157,7 +157,7 @@ internal unsafe byte[] Read(ulong len) internal static class BlockingReadWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]input-stream.blocking-read"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]input-stream.blocking-read"), WasmImportLinkage] internal static extern void wasmImportBlockingRead(int p0, long p1, nint p2); } @@ -172,7 +172,7 @@ internal unsafe byte[] BlockingRead(ulong len) var ptr = (nint)retAreaByte0; BlockingReadWasmInterop.wasmImportBlockingRead(handle, unchecked((long)(len)), ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { @@ -180,30 +180,30 @@ internal unsafe byte[] BlockingRead(ulong len) var array = new byte[BitConverter.ToInt32(new Span((void*)(ptr + 8), 4))]; new Span((void*)(BitConverter.ToInt32(new Span((void*)(ptr + 4), 4))), BitConverter.ToInt32(new Span((void*)(ptr + 8), 4))).CopyTo(new Span(array)); - lifted6 = Result.ok(array); + lifted6 = Result.ok(array); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 4), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -222,7 +222,7 @@ internal unsafe byte[] BlockingRead(ulong len) internal static class SkipWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]input-stream.skip"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]input-stream.skip"), WasmImportLinkage] internal static extern void wasmImportSkip(int p0, long p1, nint p2); } @@ -237,35 +237,35 @@ internal unsafe ulong Skip(ulong len) var ptr = (nint)retAreaByte0; SkipWasmInterop.wasmImportSkip(handle, unchecked((long)(len)), ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted6 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); + lifted6 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 8), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -284,7 +284,7 @@ internal unsafe ulong Skip(ulong len) internal static class BlockingSkipWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]input-stream.blocking-skip"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]input-stream.blocking-skip"), WasmImportLinkage] internal static extern void wasmImportBlockingSkip(int p0, long p1, nint p2); } @@ -299,35 +299,35 @@ internal unsafe ulong BlockingSkip(ulong len) var ptr = (nint)retAreaByte0; BlockingSkipWasmInterop.wasmImportBlockingSkip(handle, unchecked((long)(len)), ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted6 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); + lifted6 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 8), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -346,16 +346,16 @@ internal unsafe ulong BlockingSkip(ulong len) internal static class SubscribeWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]input-stream.subscribe"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]input-stream.subscribe"), WasmImportLinkage] internal static extern int wasmImportSubscribe(int p0); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable Subscribe() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable Subscribe() { var handle = this.Handle; var result = SubscribeWasmInterop.wasmImportSubscribe(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -372,10 +372,6 @@ internal static class SubscribeWasmInterop * promptly, which could even be zero. To wait for the stream to be ready to * accept data, the `subscribe` function to obtain a `pollable` which can be * polled for using `wasi:io/poll`. - * - * Dropping an `output-stream` while there's still an active write in - * progress may result in the data being lost. Before dropping the stream, - * be sure to fully flush your writes. */ internal class OutputStream: IDisposable { @@ -392,7 +388,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[resource-drop]output-stream"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[resource-drop]output-stream"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -408,7 +404,7 @@ protected virtual void Dispose(bool disposing) { internal static class CheckWriteWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.check-write"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.check-write"), WasmImportLinkage] internal static extern void wasmImportCheckWrite(int p0, nint p1); } @@ -423,35 +419,35 @@ internal unsafe ulong CheckWrite() var ptr = (nint)retAreaByte0; CheckWriteWasmInterop.wasmImportCheckWrite(handle, ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted6 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); + lifted6 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 8), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -470,7 +466,7 @@ internal unsafe ulong CheckWrite() internal static class WriteWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.write"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.write"), WasmImportLinkage] internal static extern void wasmImportWrite(int p0, nint p1, int p2, nint p3); } @@ -488,35 +484,35 @@ internal unsafe void Write(byte[] contents) var ptr = (nint)retAreaByte0; WriteWasmInterop.wasmImportWrite(handle, (int)buffer, (contents).Length, ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted6 = Result.ok(new global::WasiHttpWorld.None()); + lifted6 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 4), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -535,7 +531,7 @@ internal unsafe void Write(byte[] contents) internal static class BlockingWriteAndFlushWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.blocking-write-and-flush"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.blocking-write-and-flush"), WasmImportLinkage] internal static extern void wasmImportBlockingWriteAndFlush(int p0, nint p1, int p2, nint p3); } @@ -553,35 +549,35 @@ internal unsafe void BlockingWriteAndFlush(byte[] contents) var ptr = (nint)retAreaByte0; BlockingWriteAndFlushWasmInterop.wasmImportBlockingWriteAndFlush(handle, (int)buffer, (contents).Length, ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted6 = Result.ok(new global::WasiHttpWorld.None()); + lifted6 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 4), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -600,7 +596,7 @@ internal unsafe void BlockingWriteAndFlush(byte[] contents) internal static class FlushWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.flush"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.flush"), WasmImportLinkage] internal static extern void wasmImportFlush(int p0, nint p1); } @@ -615,35 +611,35 @@ internal unsafe void Flush() var ptr = (nint)retAreaByte0; FlushWasmInterop.wasmImportFlush(handle, ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted6 = Result.ok(new global::WasiHttpWorld.None()); + lifted6 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 4), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -662,7 +658,7 @@ internal unsafe void Flush() internal static class BlockingFlushWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.blocking-flush"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.blocking-flush"), WasmImportLinkage] internal static extern void wasmImportBlockingFlush(int p0, nint p1); } @@ -677,35 +673,35 @@ internal unsafe void BlockingFlush() var ptr = (nint)retAreaByte0; BlockingFlushWasmInterop.wasmImportBlockingFlush(handle, ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted6 = Result.ok(new global::WasiHttpWorld.None()); + lifted6 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 4), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -724,16 +720,16 @@ internal unsafe void BlockingFlush() internal static class SubscribeWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.subscribe"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.subscribe"), WasmImportLinkage] internal static extern int wasmImportSubscribe(int p0); } - internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable Subscribe() + internal unsafe global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable Subscribe() { var handle = this.Handle; var result = SubscribeWasmInterop.wasmImportSubscribe(handle); - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable.THandle(result)); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -741,7 +737,7 @@ internal static class SubscribeWasmInterop internal static class WriteZeroesWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.write-zeroes"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.write-zeroes"), WasmImportLinkage] internal static extern void wasmImportWriteZeroes(int p0, long p1, nint p2); } @@ -756,35 +752,35 @@ internal unsafe void WriteZeroes(ulong len) var ptr = (nint)retAreaByte0; WriteZeroesWasmInterop.wasmImportWriteZeroes(handle, unchecked((long)(len)), ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted6 = Result.ok(new global::WasiHttpWorld.None()); + lifted6 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 4), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -803,7 +799,7 @@ internal unsafe void WriteZeroes(ulong len) internal static class BlockingWriteZeroesAndFlushWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.blocking-write-zeroes-and-flush"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.blocking-write-zeroes-and-flush"), WasmImportLinkage] internal static extern void wasmImportBlockingWriteZeroesAndFlush(int p0, long p1, nint p2); } @@ -818,35 +814,35 @@ internal unsafe void BlockingWriteZeroesAndFlush(ulong len) var ptr = (nint)retAreaByte0; BlockingWriteZeroesAndFlushWasmInterop.wasmImportBlockingWriteZeroesAndFlush(handle, unchecked((long)(len)), ptr); - Result lifted6; + Result lifted6; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted6 = Result.ok(new global::WasiHttpWorld.None()); + lifted6 = Result.ok(new global::WasiHttpWorld.None()); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 4), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 8), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 4), 1)[0]}"); } - lifted6 = Result.err(lifted); + lifted6 = Result.err(lifted); break; } @@ -865,12 +861,12 @@ internal unsafe void BlockingWriteZeroesAndFlush(ulong len) internal static class SpliceWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.splice"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.splice"), WasmImportLinkage] internal static extern void wasmImportSplice(int p0, int p1, long p2, nint p3); } - internal unsafe ulong Splice(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.InputStream src, ulong len) + internal unsafe ulong Splice(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.InputStream src, ulong len) { var handle = this.Handle; var handle0 = src.Handle; @@ -881,35 +877,35 @@ internal unsafe ulong Splice(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1. var ptr = (nint)retAreaByte0; SpliceWasmInterop.wasmImportSplice(handle, handle0, unchecked((long)(len)), ptr); - Result lifted7; + Result lifted7; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted7 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); + lifted7 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 8), 1)[0]}"); } - lifted7 = Result.err(lifted); + lifted7 = Result.err(lifted); break; } @@ -928,12 +924,12 @@ internal unsafe ulong Splice(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1. internal static class BlockingSpliceWasmInterop { - [DllImport("wasi:io/streams@0.2.1", EntryPoint = "[method]output-stream.blocking-splice"), WasmImportLinkage] + [DllImport("wasi:io/streams@0.2.0", EntryPoint = "[method]output-stream.blocking-splice"), WasmImportLinkage] internal static extern void wasmImportBlockingSplice(int p0, int p1, long p2, nint p3); } - internal unsafe ulong BlockingSplice(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.InputStream src, ulong len) + internal unsafe ulong BlockingSplice(global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.InputStream src, ulong len) { var handle = this.Handle; var handle0 = src.Handle; @@ -944,35 +940,35 @@ internal unsafe ulong BlockingSplice(global::WasiHttpWorld.wit.imports.wasi.io var ptr = (nint)retAreaByte0; BlockingSpliceWasmInterop.wasmImportBlockingSplice(handle, handle0, unchecked((long)(len)), ptr); - Result lifted7; + Result lifted7; switch (new Span((void*)(ptr + 0), 1)[0]) { case 0: { - lifted7 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); + lifted7 = Result.ok(unchecked((ulong)(BitConverter.ToInt64(new Span((void*)(ptr + 8), 8))))); break; } case 1: { - global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError lifted; + global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError lifted; switch (new Span((void*)(ptr + 8), 1)[0]) { case 0: { - var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); + var resource = new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error(new global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.Error.THandle(BitConverter.ToInt32(new Span((void*)(ptr + 12), 4)))); - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.lastOperationFailed(resource); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.lastOperationFailed(resource); break; } case 1: { - lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.StreamError.closed(); + lifted = global::WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.StreamError.closed(); break; } default: throw new ArgumentException($"invalid discriminant: {new Span((void*)(ptr + 8), 1)[0]}"); } - lifted7 = Result.err(lifted); + lifted7 = Result.err(lifted); break; } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.PollInterop.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.PollInterop.cs similarity index 88% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.PollInterop.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.PollInterop.cs index 4c48ffe69e2..9af303cd3e3 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.PollInterop.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.PollInterop.cs @@ -11,18 +11,18 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_1 +namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_0 { internal static class PollInterop { internal static class PollWasmInterop { - [DllImport("wasi:io/poll@0.2.1", EntryPoint = "poll"), WasmImportLinkage] + [DllImport("wasi:io/poll@0.2.0", EntryPoint = "poll"), WasmImportLinkage] internal static extern void wasmImportPoll(nint p0, int p1, nint p2); } - internal static unsafe uint[] Poll(List @in) + internal static unsafe uint[] Poll(List @in) { byte[] buffer = new byte[4 * @in.Count]; @@ -30,7 +30,7 @@ internal static unsafe uint[] Poll(List((void*)(basePtr + 0), 4), unchecked((int)handle)); diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.StreamsInterop.cs b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.StreamsInterop.cs similarity index 88% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.StreamsInterop.cs rename to src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.StreamsInterop.cs index 7d479e6b160..ae2881e3adb 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.StreamsInterop.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_0.StreamsInterop.cs @@ -11,7 +11,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_1 +namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_0 { internal static class StreamsInterop { diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld_component_type.wit b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld_component_type.wit index a2a7c4fbf2f..b6c30d48519 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld_component_type.wit +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld_component_type.wit @@ -1,10 +1,10 @@ -package wasi:http@0.2.1; +package wasi:http@0.2.0; interface types { - use wasi:clocks/monotonic-clock@0.2.1.{duration}; - use wasi:io/streams@0.2.1.{input-stream, output-stream}; - use wasi:io/error@0.2.1.{error as io-error}; - use wasi:io/poll@0.2.1.{pollable}; + use wasi:clocks/monotonic-clock@0.2.0.{duration}; + use wasi:io/streams@0.2.0.{input-stream, output-stream}; + use wasi:io/error@0.2.0.{error as io-error}; + use wasi:io/poll@0.2.0.{pollable}; variant method { get, @@ -191,14 +191,14 @@ interface outgoing-handler { } world wasi-http { - import wasi:io/poll@0.2.1; - import wasi:clocks/monotonic-clock@0.2.1; - import wasi:io/error@0.2.1; - import wasi:io/streams@0.2.1; + import wasi:io/poll@0.2.0; + import wasi:clocks/monotonic-clock@0.2.0; + import wasi:io/error@0.2.0; + import wasi:io/streams@0.2.0; import types; import outgoing-handler; } -package wasi:io@0.2.1 { +package wasi:io@0.2.0 { interface poll { resource pollable { ready: func() -> bool; @@ -245,9 +245,9 @@ package wasi:io@0.2.1 { } -package wasi:clocks@0.2.1 { +package wasi:clocks@0.2.0 { interface monotonic-clock { - use wasi:io/poll@0.2.1.{pollable}; + use wasi:io/poll@0.2.0.{pollable}; type instant = u64; diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/generate-wasi-http-bindings.sh b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/generate-wasi-http-bindings.sh index f4bc2b72ef7..310bd291b13 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/generate-wasi-http-bindings.sh +++ b/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/generate-wasi-http-bindings.sh @@ -12,12 +12,12 @@ set -ex # [curl](https://curl.se/download.html) cargo install --locked --no-default-features --features csharp --version 0.29.0 wit-bindgen-cli -curl -OL https://github.com/WebAssembly/wasi-http/archive/refs/tags/v0.2.1.tar.gz -tar xzf v0.2.1.tar.gz -cat >wasi-http-0.2.1/wit/world.wit <wasi-http-0.2.0/wit/world.wit < - - - + + + - \ No newline at end of file + diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiEventLoop.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiEventLoop.cs index 379c5c001c0..7a09f883159 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiEventLoop.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiEventLoop.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using System.Threading.Tasks; -using WasiPollWorld.wit.imports.wasi.io.v0_2_1; +using WasiPollWorld.wit.imports.wasi.io.v0_2_0; namespace System.Threading { diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.clocks.v0_2_1.MonotonicClockInterop.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.clocks.v0_2_0.MonotonicClockInterop.cs similarity index 77% rename from src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.clocks.v0_2_1.MonotonicClockInterop.cs rename to src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.clocks.v0_2_0.MonotonicClockInterop.cs index 1a0ef026540..7c4cc8a5576 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.clocks.v0_2_1.MonotonicClockInterop.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.clocks.v0_2_0.MonotonicClockInterop.cs @@ -11,13 +11,13 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiPollWorld.wit.imports.wasi.clocks.v0_2_1 +namespace WasiPollWorld.wit.imports.wasi.clocks.v0_2_0 { internal static class MonotonicClockInterop { internal static class NowWasmInterop { - [DllImport("wasi:clocks/monotonic-clock@0.2.1", EntryPoint = "now"), WasmImportLinkage] + [DllImport("wasi:clocks/monotonic-clock@0.2.0", EntryPoint = "now"), WasmImportLinkage] internal static extern long wasmImportNow(); } @@ -32,7 +32,7 @@ internal static unsafe ulong Now() internal static class ResolutionWasmInterop { - [DllImport("wasi:clocks/monotonic-clock@0.2.1", EntryPoint = "resolution"), WasmImportLinkage] + [DllImport("wasi:clocks/monotonic-clock@0.2.0", EntryPoint = "resolution"), WasmImportLinkage] internal static extern long wasmImportResolution(); } @@ -47,15 +47,15 @@ internal static unsafe ulong Resolution() internal static class SubscribeInstantWasmInterop { - [DllImport("wasi:clocks/monotonic-clock@0.2.1", EntryPoint = "subscribe-instant"), WasmImportLinkage] + [DllImport("wasi:clocks/monotonic-clock@0.2.0", EntryPoint = "subscribe-instant"), WasmImportLinkage] internal static extern int wasmImportSubscribeInstant(long p0); } - internal static unsafe global::WasiPollWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable SubscribeInstant(ulong when) + internal static unsafe global::WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable SubscribeInstant(ulong when) { var result = SubscribeInstantWasmInterop.wasmImportSubscribeInstant(unchecked((long)(when))); - var resource = new global::WasiPollWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable(new global::WasiPollWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable.THandle(result)); + var resource = new global::WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable(new global::WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists @@ -63,15 +63,15 @@ internal static class SubscribeInstantWasmInterop internal static class SubscribeDurationWasmInterop { - [DllImport("wasi:clocks/monotonic-clock@0.2.1", EntryPoint = "subscribe-duration"), WasmImportLinkage] + [DllImport("wasi:clocks/monotonic-clock@0.2.0", EntryPoint = "subscribe-duration"), WasmImportLinkage] internal static extern int wasmImportSubscribeDuration(long p0); } - internal static unsafe global::WasiPollWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable SubscribeDuration(ulong when) + internal static unsafe global::WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable SubscribeDuration(ulong when) { var result = SubscribeDurationWasmInterop.wasmImportSubscribeDuration(unchecked((long)(when))); - var resource = new global::WasiPollWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable(new global::WasiPollWorld.wit.imports.wasi.io.v0_2_1.IPoll.Pollable.THandle(result)); + var resource = new global::WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable(new global::WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.Pollable.THandle(result)); return resource; //TODO: free alloc handle (interopString) if exists diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.cs similarity index 89% rename from src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.cs rename to src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.cs index 0c4559fe841..cadd4e8849e 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/WasiHttpHandler/WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_0.IPoll.cs @@ -11,7 +11,7 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiHttpWorld.wit.imports.wasi.io.v0_2_1; +namespace WasiPollWorld.wit.imports.wasi.io.v0_2_0; internal interface IPoll { @@ -33,7 +33,7 @@ public void Dispose() { GC.SuppressFinalize(this); } - [DllImport("wasi:io/poll@0.2.1", EntryPoint = "[resource-drop]pollable"), WasmImportLinkage] + [DllImport("wasi:io/poll@0.2.0", EntryPoint = "[resource-drop]pollable"), WasmImportLinkage] private static extern void wasmImportResourceDrop(int p0); protected virtual void Dispose(bool disposing) { @@ -49,7 +49,7 @@ protected virtual void Dispose(bool disposing) { internal static class ReadyWasmInterop { - [DllImport("wasi:io/poll@0.2.1", EntryPoint = "[method]pollable.ready"), WasmImportLinkage] + [DllImport("wasi:io/poll@0.2.0", EntryPoint = "[method]pollable.ready"), WasmImportLinkage] internal static extern int wasmImportReady(int p0); } @@ -65,7 +65,7 @@ internal unsafe bool Ready() internal static class BlockWasmInterop { - [DllImport("wasi:io/poll@0.2.1", EntryPoint = "[method]pollable.block"), WasmImportLinkage] + [DllImport("wasi:io/poll@0.2.0", EntryPoint = "[method]pollable.block"), WasmImportLinkage] internal static extern void wasmImportBlock(int p0); } diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_1.PollInterop.cs b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_0.PollInterop.cs similarity index 88% rename from src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_1.PollInterop.cs rename to src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_0.PollInterop.cs index dc01e875749..511969b9ba1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_1.PollInterop.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/WasiPollWorld.wit.imports.wasi.io.v0_2_0.PollInterop.cs @@ -11,18 +11,18 @@ using System.Diagnostics; using System.Diagnostics.CodeAnalysis; -namespace WasiPollWorld.wit.imports.wasi.io.v0_2_1 +namespace WasiPollWorld.wit.imports.wasi.io.v0_2_0 { internal static class PollInterop { internal static class PollWasmInterop { - [DllImport("wasi:io/poll@0.2.1", EntryPoint = "poll"), WasmImportLinkage] + [DllImport("wasi:io/poll@0.2.0", EntryPoint = "poll"), WasmImportLinkage] internal static extern void wasmImportPoll(nint p0, int p1, nint p2); } - internal static unsafe uint[] Poll(List @in) + internal static unsafe uint[] Poll(List @in) { byte[] buffer = new byte[4 * @in.Count]; @@ -30,7 +30,7 @@ internal static unsafe uint[] Poll(List((void*)(basePtr + 0), 4), unchecked((int)handle)); diff --git a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/generate-wasi-poll-bindings.sh b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/generate-wasi-poll-bindings.sh index fd20df8e9df..788a670e391 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/generate-wasi-poll-bindings.sh +++ b/src/libraries/System.Private.CoreLib/src/System/Threading/Wasi/generate-wasi-poll-bindings.sh @@ -12,13 +12,13 @@ set -ex # [curl](https://curl.se/download.html) cargo install --locked --no-default-features --features csharp --version 0.29.0 wit-bindgen-cli -curl -OL https://github.com/WebAssembly/wasi-http/archive/refs/tags/v0.2.1.tar.gz -tar xzf v0.2.1.tar.gz -cat >wasi-http-0.2.1/wit/world.wit <wasi-http-0.2.0/wit/world.wit <