Skip to content

Commit

Permalink
- roll back WIT to 0_2_0
Browse files Browse the repository at this point in the history
- bump wit-bindgen-cli to 0.30
  • Loading branch information
pavelsavara committed Aug 19, 2024
1 parent fe4c88c commit 424caaf
Show file tree
Hide file tree
Showing 23 changed files with 660 additions and 662 deletions.
20 changes: 10 additions & 10 deletions src/libraries/System.Net.Http/src/System.Net.Http.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -460,16 +460,16 @@
<Reference Include="System.Threading.Thread" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpHandler.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttp.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.clocks.v0_2_1.MonotonicClockInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.http.v0_2_1.ITypes.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.http.v0_2_1.OutgoingHandlerInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.http.v0_2_1.TypesInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_1.ErrorInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IError.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IPoll.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_1.IStreams.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_1.PollInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_1.StreamsInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.clocks.v0_2_0.MonotonicClockInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.http.v0_2_0.ITypes.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.http.v0_2_0.OutgoingHandlerInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.http.v0_2_0.TypesInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_0.ErrorInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IError.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IPoll.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_0.IStreams.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_0.PollInterop.cs" />
<Compile Include="System\Net\Http\WasiHttpHandler\WasiHttpWorld.wit.imports.wasi.io.v0_2_0.StreamsInterop.cs" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by `wit-bindgen` 0.29.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.30.0. DO NOT EDIT!
// <auto-generated />
#nullable enable
using System;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by `wit-bindgen` 0.29.0. DO NOT EDIT!
// Generated by `wit-bindgen` 0.30.0. DO NOT EDIT!
// <auto-generated />
#nullable enable

Expand All @@ -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();

}
Expand All @@ -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();

}
Expand All @@ -47,31 +47,31 @@ 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
}

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
Expand Down
Loading

0 comments on commit 424caaf

Please sign in to comment.