Skip to content

Commit 3aa8508

Browse files
authored
Merge pull request #721 from wado-lang/claude/update-wasmtime-5iyBC
Update wasmtime from v42 to v43
2 parents bccc8bb + 7fbdbae commit 3aa8508

File tree

766 files changed

+25703
-67799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

766 files changed

+25703
-67799
lines changed

Cargo.lock

Lines changed: 101 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ wasmparser = { version = "0.245" }
2323
wasmprinter = { version = "0.245" }
2424
walrus = { version = "0.26" }
2525
wit-parser = { version = "0.245" }
26-
wasmtime = { version = "42", features = ["async", "component-model", "component-model-async"] }
27-
wasmtime-wasi = { version = "42", features = ["p3"] }
28-
wasmtime-wasi-http = { version = "42", features = ["p3"] }
26+
wasmtime = { version = "43", features = ["async", "component-model", "component-model-async"] }
27+
wasmtime-wasi = { version = "43", features = ["p3"] }
28+
wasmtime-wasi-http = { version = "43", features = ["p3"] }
2929
bytes = { version = "1" }
3030
futures = { version = "0.3" }
3131
http = { version = "1" }

docs/cheatsheet-stdlib-wasi.md

Lines changed: 97 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@ pub effect Stdin {
4646

4747
```wado
4848
pub effect Stdout {
49-
async fn write_via_stream(data: Stream<u8>) -> Result<(), ErrorCode>;
49+
fn write_via_stream(data: Stream<u8>) -> Future<Result<(), ErrorCode>>;
5050
}
5151
```
5252

5353
```wado
5454
pub effect Stderr {
55-
async fn write_via_stream(data: Stream<u8>) -> Result<(), ErrorCode>;
55+
fn write_via_stream(data: Stream<u8>) -> Future<Result<(), ErrorCode>>;
5656
}
5757
```
5858

@@ -123,60 +123,6 @@ pub flags OpenFlags {
123123

124124
### Enums
125125

126-
```wado
127-
pub enum DescriptorType {
128-
Unknown,
129-
BlockDevice,
130-
CharacterDevice,
131-
Directory,
132-
Fifo,
133-
SymbolicLink,
134-
RegularFile,
135-
Socket,
136-
}
137-
```
138-
139-
```wado
140-
pub enum ErrorCode {
141-
Access,
142-
Already,
143-
BadDescriptor,
144-
Busy,
145-
Deadlock,
146-
Quota,
147-
Exist,
148-
FileTooLarge,
149-
IllegalByteSequence,
150-
InProgress,
151-
Interrupted,
152-
Invalid,
153-
Io,
154-
IsDirectory,
155-
Loop,
156-
TooManyLinks,
157-
MessageSize,
158-
NameTooLong,
159-
NoDevice,
160-
NoEntry,
161-
NoLock,
162-
InsufficientMemory,
163-
InsufficientSpace,
164-
NotDirectory,
165-
NotEmpty,
166-
NotRecoverable,
167-
Unsupported,
168-
NoTty,
169-
NoSuchDevice,
170-
Overflow,
171-
NotPermitted,
172-
Pipe,
173-
ReadOnly,
174-
InvalidSeek,
175-
TextFileBusy,
176-
CrossDevice,
177-
}
178-
```
179-
180126
```wado
181127
pub enum Advice {
182128
Normal,
@@ -201,15 +147,15 @@ pub effect Preopens {
201147
```wado
202148
pub resource Descriptor {
203149
fn read_via_stream(self: &Descriptor, offset: Filesize) -> [Stream<u8>, Future<Result<(), ErrorCode>>];
204-
async fn write_via_stream(self: &Descriptor, data: Stream<u8>, offset: Filesize) -> Result<(), ErrorCode>;
205-
async fn append_via_stream(self: &Descriptor, data: Stream<u8>) -> Result<(), ErrorCode>;
150+
fn write_via_stream(self: &Descriptor, data: Stream<u8>, offset: Filesize) -> Future<Result<(), ErrorCode>>;
151+
fn append_via_stream(self: &Descriptor, data: Stream<u8>) -> Future<Result<(), ErrorCode>>;
206152
async fn advise(self: &Descriptor, offset: Filesize, length: Filesize, advice: Advice) -> Result<(), ErrorCode>;
207153
async fn sync_data(self: &Descriptor) -> Result<(), ErrorCode>;
208154
async fn get_flags(self: &Descriptor) -> Result<DescriptorFlags, ErrorCode>;
209155
async fn get_type(self: &Descriptor) -> Result<DescriptorType, ErrorCode>;
210156
async fn set_size(self: &Descriptor, size: Filesize) -> Result<(), ErrorCode>;
211157
async fn set_times(self: &Descriptor, data_access_timestamp: NewTimestamp, data_modification_timestamp: NewTimestamp) -> Result<(), ErrorCode>;
212-
async fn read_directory(self: &Descriptor) -> [Stream<DirectoryEntry>, Future<Result<(), ErrorCode>>];
158+
fn read_directory(self: &Descriptor) -> [Stream<DirectoryEntry>, Future<Result<(), ErrorCode>>];
213159
async fn sync(self: &Descriptor) -> Result<(), ErrorCode>;
214160
async fn create_directory_at(self: &Descriptor, path: String) -> Result<(), ErrorCode>;
215161
async fn stat(self: &Descriptor) -> Result<DescriptorStat, ErrorCode>;
@@ -257,6 +203,19 @@ pub struct MetadataHashValue {
257203

258204
### Variants
259205

206+
```wado
207+
pub variant DescriptorType {
208+
BlockDevice,
209+
CharacterDevice,
210+
Directory,
211+
Fifo,
212+
SymbolicLink,
213+
RegularFile,
214+
Socket,
215+
Other(Option<String>),
216+
}
217+
```
218+
260219
```wado
261220
pub variant NewTimestamp {
262221
NoChange,
@@ -265,6 +224,48 @@ pub variant NewTimestamp {
265224
}
266225
```
267226

227+
```wado
228+
pub variant ErrorCode {
229+
Access,
230+
Already,
231+
BadDescriptor,
232+
Busy,
233+
Deadlock,
234+
Quota,
235+
Exist,
236+
FileTooLarge,
237+
IllegalByteSequence,
238+
InProgress,
239+
Interrupted,
240+
Invalid,
241+
Io,
242+
IsDirectory,
243+
Loop,
244+
TooManyLinks,
245+
MessageSize,
246+
NameTooLong,
247+
NoDevice,
248+
NoEntry,
249+
NoLock,
250+
InsufficientMemory,
251+
InsufficientSpace,
252+
NotDirectory,
253+
NotEmpty,
254+
NotRecoverable,
255+
Unsupported,
256+
NoTty,
257+
NoSuchDevice,
258+
Overflow,
259+
NotPermitted,
260+
Pipe,
261+
ReadOnly,
262+
InvalidSeek,
263+
TextFileBusy,
264+
CrossDevice,
265+
Other(Option<String>),
266+
}
267+
```
268+
268269
## wasi:http
269270

270271
### Types
@@ -445,13 +446,16 @@ pub variant HeaderError {
445446
InvalidSyntax,
446447
Forbidden,
447448
Immutable,
449+
SizeExceeded,
450+
Other(Option<String>),
448451
}
449452
```
450453

451454
```wado
452455
pub variant RequestOptionsError {
453456
NotSupported,
454457
Immutable,
458+
Other(Option<String>),
455459
}
456460
```
457461

@@ -511,14 +515,14 @@ pub effect InsecureSeed {
511515

512516
```wado
513517
pub effect Insecure {
514-
fn get_insecure_random_bytes(len: u64) -> Array<u8>;
518+
fn get_insecure_random_bytes(max_len: u64) -> Array<u8>;
515519
fn get_insecure_random_u64() -> u64;
516520
}
517521
```
518522

519523
```wado
520524
pub effect Random {
521-
fn get_random_bytes(len: u64) -> Array<u8>;
525+
fn get_random_bytes(max_len: u64) -> Array<u8>;
522526
fn get_random_u64() -> u64;
523527
}
524528
```
@@ -534,43 +538,13 @@ pub type Ipv6Address = [u16, u16, u16, u16, u16, u16, u16, u16];
534538

535539
### Enums
536540

537-
```wado
538-
pub enum ErrorCode {
539-
Unknown,
540-
AccessDenied,
541-
NotSupported,
542-
InvalidArgument,
543-
OutOfMemory,
544-
Timeout,
545-
InvalidState,
546-
AddressNotBindable,
547-
AddressInUse,
548-
RemoteUnreachable,
549-
ConnectionRefused,
550-
ConnectionReset,
551-
ConnectionAborted,
552-
DatagramTooLarge,
553-
}
554-
```
555-
556541
```wado
557542
pub enum IpAddressFamily {
558543
Ipv4,
559544
Ipv6,
560545
}
561546
```
562547

563-
```wado
564-
pub enum ErrorCode {
565-
Unknown,
566-
AccessDenied,
567-
InvalidArgument,
568-
NameUnresolvable,
569-
TemporaryResolverFailure,
570-
PermanentResolverFailure,
571-
}
572-
```
573-
574548
### Effects
575549

576550
```wado
@@ -587,7 +561,7 @@ pub resource TcpSocket {
587561
fn bind(self: &TcpSocket, local_address: IpSocketAddress) -> Result<(), ErrorCode>;
588562
async fn connect(self: &TcpSocket, remote_address: IpSocketAddress) -> Result<(), ErrorCode>;
589563
fn listen(self: &TcpSocket) -> Result<Stream<TcpSocket>, ErrorCode>;
590-
async fn send(self: &TcpSocket, data: Stream<u8>) -> Result<(), ErrorCode>;
564+
fn send(self: &TcpSocket, data: Stream<u8>) -> Future<Result<(), ErrorCode>>;
591565
fn receive(self: &TcpSocket) -> [Stream<u8>, Future<Result<(), ErrorCode>>];
592566
fn get_local_address(self: &TcpSocket) -> Result<IpSocketAddress, ErrorCode>;
593567
fn get_remote_address(self: &TcpSocket) -> Result<IpSocketAddress, ErrorCode>;
@@ -651,6 +625,26 @@ pub struct Ipv6SocketAddress {
651625

652626
### Variants
653627

628+
```wado
629+
pub variant ErrorCode {
630+
AccessDenied,
631+
NotSupported,
632+
InvalidArgument,
633+
OutOfMemory,
634+
Timeout,
635+
InvalidState,
636+
AddressNotBindable,
637+
AddressInUse,
638+
RemoteUnreachable,
639+
ConnectionRefused,
640+
ConnectionBroken,
641+
ConnectionReset,
642+
ConnectionAborted,
643+
DatagramTooLarge,
644+
Other(Option<String>),
645+
}
646+
```
647+
654648
```wado
655649
pub variant IpAddress {
656650
Ipv4(Ipv4Address),
@@ -664,3 +658,14 @@ pub variant IpSocketAddress {
664658
Ipv6(Ipv6SocketAddress),
665659
}
666660
```
661+
662+
```wado
663+
pub variant ErrorCode {
664+
AccessDenied,
665+
InvalidArgument,
666+
NameUnresolvable,
667+
TemporaryResolverFailure,
668+
PermanentResolverFailure,
669+
Other(Option<String>),
670+
}
671+
```

docs/stdlib-core.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3266,10 +3266,6 @@ CLI helpers: `println`, `eprintln`, `args`, `env`, `exit`, etc.
32663266
#### `pub fn write_to_stream(tx: StreamWritable<u8>, message: String, add_newline: bool)`
32673267

32683268
Writes a string to a StreamWritable<u8> with an optional newline, then drops it.
3269-
Called AFTER the consumer (write_via_stream) has been started.
3270-
3271-
Uses write_raw to pass String's internal GC array directly to the stream,
3272-
avoiding the intermediate String → Array<u8> byte-by-byte copy.
32733269

32743270
#### `pub fn println(message: String) with Stdout`
32753271

@@ -3318,14 +3314,12 @@ Exits with a specific status code.
33183314
#### `pub fn log_stdout(message: String)`
33193315

33203316
Logs a message with newline to stdout (ambient, no effect required).
3321-
Waits for completion.
33223317
Uses builtin::call_indirect__ to bypass the effect system — this is
33233318
intentional for logging/debugging which must work without effects.
33243319

33253320
#### `pub fn log_stderr(message: String)`
33263321

33273322
Logs a message with newline to stderr (ambient, no effect required).
3328-
Waits for completion.
33293323
Uses builtin::call_indirect__ to bypass the effect system — this is
33303324
intentional for logging/debugging which must work without effects.
33313325

0 commit comments

Comments
 (0)