@@ -14,91 +14,111 @@ mod latest {
14
14
}
15
15
}
16
16
17
- wasmtime:: component:: bindgen!( {
18
- path: "../../wit-2023-10-18" ,
19
- interfaces: r#"
20
- include wasi:http/[email protected] ;
21
-
22
- // NB: this is handling the historical behavior where Spin supported
23
- // more than "just" this snaphsot of the proxy world but additionally
24
- // other CLI-related interfaces.
25
- include wasi:cli/[email protected] ;
26
- "# ,
27
- async : {
28
- only_imports: [
29
- "[method]descriptor.access-at" ,
30
- "[method]descriptor.advise" ,
31
- "[method]descriptor.change-directory-permissions-at" ,
32
- "[method]descriptor.change-file-permissions-at" ,
33
- "[method]descriptor.create-directory-at" ,
34
- "[method]descriptor.get-flags" ,
35
- "[method]descriptor.get-type" ,
36
- "[method]descriptor.is-same-object" ,
37
- "[method]descriptor.link-at" ,
38
- "[method]descriptor.lock-exclusive" ,
39
- "[method]descriptor.lock-shared" ,
40
- "[method]descriptor.metadata-hash" ,
41
- "[method]descriptor.metadata-hash-at" ,
42
- "[method]descriptor.open-at" ,
43
- "[method]descriptor.read" ,
44
- "[method]descriptor.read-directory" ,
45
- "[method]descriptor.readlink-at" ,
46
- "[method]descriptor.remove-directory-at" ,
47
- "[method]descriptor.rename-at" ,
48
- "[method]descriptor.set-size" ,
49
- "[method]descriptor.set-times" ,
50
- "[method]descriptor.set-times-at" ,
51
- "[method]descriptor.stat" ,
52
- "[method]descriptor.stat-at" ,
53
- "[method]descriptor.symlink-at" ,
54
- "[method]descriptor.sync" ,
55
- "[method]descriptor.sync-data" ,
56
- "[method]descriptor.try-lock-exclusive" ,
57
- "[method]descriptor.try-lock-shared" ,
58
- "[method]descriptor.unlink-file-at" ,
59
- "[method]descriptor.unlock" ,
60
- "[method]descriptor.write" ,
61
- "[method]input-stream.read" ,
62
- "[method]input-stream.blocking-read" ,
63
- "[method]input-stream.blocking-skip" ,
64
- "[method]input-stream.skip" ,
65
- "[method]output-stream.forward" ,
66
- "[method]output-stream.splice" ,
67
- "[method]output-stream.blocking-splice" ,
68
- "[method]output-stream.blocking-flush" ,
69
- "[method]output-stream.blocking-write" ,
70
- "[method]output-stream.blocking-write-and-flush" ,
71
- "[method]output-stream.blocking-write-zeroes-and-flush" ,
72
- "[method]directory-entry-stream.read-directory-entry" ,
73
- "poll-list" ,
74
- "poll-one" ,
75
- ] ,
76
- } ,
77
- with: {
78
- "wasi:io/poll/pollable" : latest:: io:: poll:: Pollable ,
79
- "wasi:io/streams/input-stream" : latest:: io:: streams:: InputStream ,
80
- "wasi:io/streams/output-stream" : latest:: io:: streams:: OutputStream ,
81
- "wasi:io/streams/error" : latest:: io:: streams:: Error ,
82
- "wasi:filesystem/types/directory-entry-stream" : latest:: filesystem:: types:: DirectoryEntryStream ,
83
- "wasi:filesystem/types/descriptor" : latest:: filesystem:: types:: Descriptor ,
84
- "wasi:cli/terminal-input/terminal-input" : latest:: cli:: terminal_input:: TerminalInput ,
85
- "wasi:cli/terminal-output/terminal-output" : latest:: cli:: terminal_output:: TerminalOutput ,
86
- "wasi:sockets/tcp/tcp-socket" : latest:: sockets:: tcp:: TcpSocket ,
87
- "wasi:sockets/udp/udp-socket" : UdpSocket ,
88
- "wasi:sockets/network/network" : latest:: sockets:: network:: Network ,
89
- "wasi:sockets/ip-name-lookup/resolve-address-stream" : latest:: sockets:: ip_name_lookup:: ResolveAddressStream ,
90
- "wasi:http/types/incoming-response" : latest:: http:: types:: IncomingResponse ,
91
- "wasi:http/types/incoming-request" : latest:: http:: types:: IncomingRequest ,
92
- "wasi:http/types/incoming-body" : latest:: http:: types:: IncomingBody ,
93
- "wasi:http/types/outgoing-response" : latest:: http:: types:: OutgoingResponse ,
94
- "wasi:http/types/outgoing-request" : latest:: http:: types:: OutgoingRequest ,
95
- "wasi:http/types/outgoing-body" : latest:: http:: types:: OutgoingBody ,
96
- "wasi:http/types/fields" : latest:: http:: types:: Fields ,
97
- "wasi:http/types/response-outparam" : latest:: http:: types:: ResponseOutparam ,
98
- "wasi:http/types/future-incoming-response" : latest:: http:: types:: FutureIncomingResponse ,
99
- "wasi:http/types/future-trailers" : latest:: http:: types:: FutureTrailers ,
100
- } ,
101
- } ) ;
17
+ mod bindings {
18
+ use super :: latest;
19
+ pub use super :: UdpSocket ;
20
+
21
+ wasmtime:: component:: bindgen!( {
22
+ path: "../../wit" ,
23
+ interfaces: r#"
24
+ include wasi:http/[email protected] ;
25
+
26
+ // NB: this is handling the historical behavior where Spin supported
27
+ // more than "just" this snaphsot of the proxy world but additionally
28
+ // other CLI-related interfaces.
29
+ include wasi:cli/[email protected] ;
30
+ "# ,
31
+ async : {
32
+ only_imports: [
33
+ "[method]descriptor.access-at" ,
34
+ "[method]descriptor.advise" ,
35
+ "[method]descriptor.change-directory-permissions-at" ,
36
+ "[method]descriptor.change-file-permissions-at" ,
37
+ "[method]descriptor.create-directory-at" ,
38
+ "[method]descriptor.get-flags" ,
39
+ "[method]descriptor.get-type" ,
40
+ "[method]descriptor.is-same-object" ,
41
+ "[method]descriptor.link-at" ,
42
+ "[method]descriptor.lock-exclusive" ,
43
+ "[method]descriptor.lock-shared" ,
44
+ "[method]descriptor.metadata-hash" ,
45
+ "[method]descriptor.metadata-hash-at" ,
46
+ "[method]descriptor.open-at" ,
47
+ "[method]descriptor.read" ,
48
+ "[method]descriptor.read-directory" ,
49
+ "[method]descriptor.readlink-at" ,
50
+ "[method]descriptor.remove-directory-at" ,
51
+ "[method]descriptor.rename-at" ,
52
+ "[method]descriptor.set-size" ,
53
+ "[method]descriptor.set-times" ,
54
+ "[method]descriptor.set-times-at" ,
55
+ "[method]descriptor.stat" ,
56
+ "[method]descriptor.stat-at" ,
57
+ "[method]descriptor.symlink-at" ,
58
+ "[method]descriptor.sync" ,
59
+ "[method]descriptor.sync-data" ,
60
+ "[method]descriptor.try-lock-exclusive" ,
61
+ "[method]descriptor.try-lock-shared" ,
62
+ "[method]descriptor.unlink-file-at" ,
63
+ "[method]descriptor.unlock" ,
64
+ "[method]descriptor.write" ,
65
+ "[method]input-stream.read" ,
66
+ "[method]input-stream.blocking-read" ,
67
+ "[method]input-stream.blocking-skip" ,
68
+ "[method]input-stream.skip" ,
69
+ "[method]output-stream.forward" ,
70
+ "[method]output-stream.splice" ,
71
+ "[method]output-stream.blocking-splice" ,
72
+ "[method]output-stream.blocking-flush" ,
73
+ "[method]output-stream.blocking-write" ,
74
+ "[method]output-stream.blocking-write-and-flush" ,
75
+ "[method]output-stream.blocking-write-zeroes-and-flush" ,
76
+ "[method]directory-entry-stream.read-directory-entry" ,
77
+ "poll-list" ,
78
+ "poll-one" ,
79
+ ] ,
80
+ } ,
81
+ with: {
82
+ "wasi:io/poll/pollable" : latest:: io:: poll:: Pollable ,
83
+ "wasi:io/streams/input-stream" : latest:: io:: streams:: InputStream ,
84
+ "wasi:io/streams/output-stream" : latest:: io:: streams:: OutputStream ,
85
+ "wasi:io/streams/error" : latest:: io:: streams:: Error ,
86
+ "wasi:filesystem/types/directory-entry-stream" : latest:: filesystem:: types:: DirectoryEntryStream ,
87
+ "wasi:filesystem/types/descriptor" : latest:: filesystem:: types:: Descriptor ,
88
+ "wasi:cli/terminal-input/terminal-input" : latest:: cli:: terminal_input:: TerminalInput ,
89
+ "wasi:cli/terminal-output/terminal-output" : latest:: cli:: terminal_output:: TerminalOutput ,
90
+ "wasi:sockets/tcp/tcp-socket" : latest:: sockets:: tcp:: TcpSocket ,
91
+ "wasi:sockets/udp/udp-socket" : UdpSocket ,
92
+ "wasi:sockets/network/network" : latest:: sockets:: network:: Network ,
93
+ "wasi:sockets/ip-name-lookup/resolve-address-stream" : latest:: sockets:: ip_name_lookup:: ResolveAddressStream ,
94
+ "wasi:http/types/incoming-response" : latest:: http:: types:: IncomingResponse ,
95
+ "wasi:http/types/incoming-request" : latest:: http:: types:: IncomingRequest ,
96
+ "wasi:http/types/incoming-body" : latest:: http:: types:: IncomingBody ,
97
+ "wasi:http/types/outgoing-response" : latest:: http:: types:: OutgoingResponse ,
98
+ "wasi:http/types/outgoing-request" : latest:: http:: types:: OutgoingRequest ,
99
+ "wasi:http/types/outgoing-body" : latest:: http:: types:: OutgoingBody ,
100
+ "wasi:http/types/fields" : latest:: http:: types:: Fields ,
101
+ "wasi:http/types/response-outparam" : latest:: http:: types:: ResponseOutparam ,
102
+ "wasi:http/types/future-incoming-response" : latest:: http:: types:: FutureIncomingResponse ,
103
+ "wasi:http/types/future-trailers" : latest:: http:: types:: FutureTrailers ,
104
+ } ,
105
+ } ) ;
106
+ }
107
+
108
+ mod wasi {
109
+ pub use super :: bindings:: wasi:: {
110
+ cli0_2_0_rc_2023_10_18 as cli, clocks0_2_0_rc_2023_10_18 as clocks,
111
+ filesystem0_2_0_rc_2023_10_18 as filesystem, http0_2_0_rc_2023_10_18 as http,
112
+ io0_2_0_rc_2023_10_18 as io, random0_2_0_rc_2023_10_18 as random,
113
+ sockets0_2_0_rc_2023_10_18 as sockets,
114
+ } ;
115
+ }
116
+
117
+ pub mod exports {
118
+ pub mod wasi {
119
+ pub use super :: super :: bindings:: exports:: wasi:: http0_2_0_rc_2023_10_18 as http;
120
+ }
121
+ }
102
122
103
123
use wasi:: cli:: terminal_input:: TerminalInput ;
104
124
use wasi:: cli:: terminal_output:: TerminalOutput ;
0 commit comments