Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add wasi-0.3.0 draft #111

Merged
merged 37 commits into from
Jan 21, 2025
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
d0f8ab5
feat: add `wasi-0.3.0` draft
rvolosatovs Jan 14, 2025
8cc04c8
refactor: replace `error-context` introspection by futures
rvolosatovs Jan 14, 2025
8a3b482
chore: bump `@since` to `0.3.0`
rvolosatovs Jan 14, 2025
a4ca7f6
feat(0.3): introduce `tcp-connection`
rvolosatovs Jan 15, 2025
955b5a4
Add TcpSocketOperationalSemantics-0.3.0-draft.md
badeend Jan 16, 2025
c5b9684
Remove resolve-address-stream
badeend Jan 16, 2025
26390db
Split lookup errors off from the general socket errors type
badeend Jan 16, 2025
bee1ffd
Remove the runtime `network` capability and rely solely on link-time …
badeend Jan 16, 2025
6de677f
Remove `create-tcp/udp-socket` methods & interfaces in favor of plain…
badeend Jan 16, 2025
4417d18
Rename `write` -> `send`, `read` -> `receive`
badeend Jan 16, 2025
544ec8c
Remove the TCP `shutdown` method. It is redundant now that we have pr…
badeend Jan 16, 2025
5134af0
Now that binding a socket doesn't require a runtime network handle an…
badeend Jan 16, 2025
3778219
Merge `listen` & `accept` into a single method that returns a stream …
badeend Jan 16, 2025
2752e1b
Update state names
badeend Jan 16, 2025
c48f6b9
Clarify EALREADY equivalence
badeend Jan 16, 2025
ee62973
Remove superfluous `concurrency-conflict` error code. `invalid-state`…
badeend Jan 16, 2025
c483c3a
Add Since annotations to tcp-connection
badeend Jan 16, 2025
401fc2b
Remove last references to wasi:io
badeend Jan 16, 2025
762a3ab
Remove outdated doc now that we have tcp-connection.
badeend Jan 16, 2025
7f3ec8d
Now that binding a socket doesn't require a runtime network handle an…
badeend Jan 16, 2025
0e8554f
feat(0.3): asyncify `resolve-address-stream`
rvolosatovs Jan 16, 2025
dbe26c7
Merge UDP `send` into `%stream`
badeend Jan 16, 2025
5ab0f73
Rename `%stream` to `transfer`. The `%stream` name was already subopt…
badeend Jan 16, 2025
2214d2f
Merge branch 'feat/0.3.0-draft' of https://github.com/rvolosatovs/was…
badeend Jan 16, 2025
60dd2e8
Rename `network.wit` to `types.wit` to match other proposals
badeend Jan 16, 2025
d1107f5
Move tcp-socket & udp-socket into types.wit to match other proposals.
badeend Jan 16, 2025
3abda6e
Make wit-bindgen work. It failed with:
badeend Jan 16, 2025
e92d144
Update TcpSocketOperationalSemantics-0.3.0-draft.md
badeend Jan 16, 2025
f646c25
feat: update wit-deps to 0.5.0
rvolosatovs Jan 16, 2025
bbebffa
Update wit-0.3.0-draft/types.wit
badeend Jan 17, 2025
074d948
Fix WSARecvMsg link
badeend Jan 19, 2025
5efd1e9
Document the distinction between permanent and transient errors on `l…
badeend Jan 19, 2025
7545a4b
Move `send` & `receive` into `tcp-socket`, simplifying the signatures…
badeend Jan 19, 2025
92248c5
Revert usage of `streams` for UDP. `stream`s can fail only once and t…
badeend Jan 19, 2025
148f43e
Remove inbound/outbound-datagram records. They were added in anticipa…
badeend Jan 19, 2025
dcf0b76
Remove outer result from `receive`
badeend Jan 19, 2025
0e6b058
Clarify `address-family`
badeend Jan 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Now that binding a socket doesn't require a runtime network handle an…
…ymore, `stream` is free to do an implicit bind again. Just like POSIX.
  • Loading branch information
badeend committed Jan 16, 2025
commit 7f3ec8d56bfe7a8f52d9bcb400327d8dc48c427b
12 changes: 6 additions & 6 deletions wit-0.3.0-draft/udp.wit
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,12 @@ interface udp {

/// Set up inbound & outbound communication channels, optionally to a specific peer.
///
/// This function only changes the local socket configuration and does not generate any network traffic.
/// On success, the `remote-address` of the socket is updated. The `local-address` may be updated as well,
/// based on the best network path to `remote-address`.
/// This function only changes the local socket configuration and does
/// not generate any network traffic. On success, the `remote-address`
/// of the socket is updated. The `local-address` may be updated as well,
/// based on the best network path to `remote-address`. If the socket was
/// not already explicitly bound, this function will implicitly bind the
/// socket to a random free port.
///
/// When a `remote-address` is provided, the returned streams are limited to communicating with that specific peer:
/// - `send` can only be used to send to this destination.
Expand All @@ -100,14 +103,11 @@ interface udp {
/// connect(s, remote_address)
/// }
/// ```
///
/// Unlike in POSIX, the socket must already be explicitly bound.
///
/// # Typical errors
/// - `invalid-argument`: The `remote-address` has the wrong address family. (EAFNOSUPPORT)
/// - `invalid-argument`: The IP address in `remote-address` is set to INADDR_ANY (`0.0.0.0` / `::`). (EDESTADDRREQ, EADDRNOTAVAIL)
/// - `invalid-argument`: The port in `remote-address` is set to 0. (EDESTADDRREQ, EADDRNOTAVAIL)
/// - `invalid-state`: The socket is not bound.
/// - `address-in-use`: Tried to perform an implicit bind, but there were no ephemeral ports available. (EADDRINUSE, EADDRNOTAVAIL on Linux, EAGAIN on BSD)
/// - `remote-unreachable`: The remote address is not reachable. (ECONNRESET, ENETRESET, EHOSTUNREACH, EHOSTDOWN, ENETUNREACH, ENETDOWN, ENONET)
/// - `connection-refused`: The connection was refused. (ECONNREFUSED)
Expand Down