History log of /wasmtime-44.0.1/crates/wasi/src/runtime.rs (Results 1 – 9 of 9)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7, v43.0.0, v42.0.1, v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6, v41.0.3, v41.0.2, v41.0.1, v36.0.5, v40.0.3, v41.0.0, v36.0.4, v39.0.2, v40.0.2, v40.0.1, v40.0.0, v39.0.1, v39.0.0, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1, v37.0.2, v37.0.1, v37.0.0, v36.0.2, v36.0.1, v36.0.0, v35.0.0, v24.0.4, v33.0.2, v34.0.2, v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0
# d41b0a71 22-May-2025 Alex Crichton <[email protected]>

Use `Waker::noop` from Rust 1.85 (#10804)

Now possible after #10785


Revision tags: v33.0.0, v32.0.0, v31.0.0
# e8d5e3ae 07-Mar-2025 James Sturtevant <[email protected]>

Initial implementation of Wasi-tls (Transport Layer Security) (#10249)

* Initial implementation of wasi-tls

This crate provides the Wasmtime host implementation for the [wasi-tls] API.
The [wasi-t

Initial implementation of Wasi-tls (Transport Layer Security) (#10249)

* Initial implementation of wasi-tls

This crate provides the Wasmtime host implementation for the [wasi-tls] API.
The [wasi-tls] world allows WebAssembly modules to perform SSL/TLS operations,
such as establishing secure connections to servers. TLS often relies on other wasi networking systems
to provide the stream so it will be common to enable the [wasi:cli] world as well with the networking features enabled.

The initial implemntation is using rustls.

Signed-off-by: James Sturtevant <[email protected]>

* Remove configuration object for now

Signed-off-by: James Sturtevant <[email protected]>

* Update cargo patch to use temp branch

Signed-off-by: James Sturtevant <[email protected]>

* Rename tcp streams to wasistreams to be more generic

Signed-off-by: James Sturtevant <[email protected]>

* gate the wasi-tls ctx behind a feature

Signed-off-by: James Sturtevant <[email protected]>

* cleanup and clippy fixes

Signed-off-by: James Sturtevant <[email protected]>

* Fix issue when another pollable cancels

Signed-off-by: James Sturtevant <[email protected]>

* prtest:full

Signed-off-by: James Sturtevant <[email protected]>

* Skip test on riscv64/s390x

Signed-off-by: James Sturtevant <[email protected]>

* Drop debug info to support tests on pulley based platforms

Signed-off-by: James Sturtevant <[email protected]>

* Update signature of `close-notify`

* Use draft version

Signed-off-by: James Sturtevant <[email protected]>

* Remove patches

Signed-off-by: James Sturtevant <[email protected]>

* Ungate tls on riscv64 and s390x

* Un-gate wais-http on riscv64/s390x as well

* Add wasmtime-wasi-tls to publish list

* Add wasmtime-wasi-tls to public API crate list

* Revert some changes to Cargo.lock

---------

Signed-off-by: James Sturtevant <[email protected]>
Signed-off-by: James Sturtevant <[email protected]>
Co-authored-by: badeend <[email protected]>
Co-authored-by: Alex Crichton <[email protected]>

show more ...


Revision tags: v30.0.2, v30.0.1, v30.0.0, v29.0.1, v29.0.0, v28.0.1
# a2770fc5 13-Jan-2025 Asakura Mizu <[email protected]>

Fix typo (#9991)


Revision tags: v28.0.0, v27.0.0, v26.0.1, v25.0.3, v24.0.2
# b79a96a1 22-Oct-2024 Alex Crichton <[email protected]>

Leverage Rust 1.79, 1.80 (#9498)

This commit is a follow-up to #9496 to leverage various APIs that the
workspace now has access to. For example most dependencies on the
`once_cell` crate are now rem

Leverage Rust 1.79, 1.80 (#9498)

This commit is a follow-up to #9496 to leverage various APIs that the
workspace now has access to. For example most dependencies on the
`once_cell` crate are now removed in favor of the types stabilized in
the standard library: `LazyLock` and `LazyCell`. One dependency remains
in the `wasmtime` crate due to the `get_or_try_init` not being stable
yet.

Some additional helper methods on raw pointer slices are also available
for removing a few minor `unsafe` blocks.

show more ...


Revision tags: v26.0.0, v21.0.2, v22.0.1, v23.0.3, v25.0.2, v24.0.1, v25.0.1, v25.0.0
# 696d19f7 12-Sep-2024 Dave Bakker <[email protected]>

wasi-sockets: Fix `shutdown` bugs (#9225)

* Rename:
LastWrite -> WriteState,
Done -> Ready,
Waiting -> Writing

* Wrap the TCP streams inside a mutex.
And rename `abort_wait` to `cancel`

* Move shu

wasi-sockets: Fix `shutdown` bugs (#9225)

* Rename:
LastWrite -> WriteState,
Done -> Ready,
Waiting -> Writing

* Wrap the TCP streams inside a mutex.
And rename `abort_wait` to `cancel`

* Move shutdown into the stream types

* Fix Linux-specific peculiarity where `recv` continues to work even after `shutdown(sock, SHUT_RD)` has been called.

* Refactor poll_cancel

* Fix data loss issue.
Calling `shutdown` _after_ data has been accepted by `write`, but _before_ it has been fully flushed, caused the in-flight data to be lost.

* Simplify poll_cancel

* Use tokio::sync::Mutex instead of std::sync::Mutex so I can revert to regular async code

show more ...


Revision tags: v24.0.0
# 28b3cb11 15-Aug-2024 Dave Bakker <[email protected]>

wasi-filesystem: Implement `HostInputStream` & `HostOutputStream` (#9129)

* Add the ability to generate async drop methods for resources.

In the component model, `resource.drop` is a canonical buil

wasi-filesystem: Implement `HostInputStream` & `HostOutputStream` (#9129)

* Add the ability to generate async drop methods for resources.

In the component model, `resource.drop` is a canonical built-in without a proper name. So I invented a custom naming scheme for the component bindgen config. I went with:
`"[drop]{resource-name}"` where `{resource-name}` is the name as defined in WIT. e.g. `"[drop]input-stream"`.

This shouldn't conflict with anything existing in the wild as WIT identifiers are not allowed to contain square brackets.

* Make `input-stream::drop` & `output-stream::drop` async

* Prevent the guest from (inadvertently) spawning an unlimited amount of background tasks through the FileOutputStream

* Properly clean up background tasks for even more types of I/O streams.
Unlike FileOutputStream, the background tasks of these stream types are truly async. So aborting _without_ awaiting them was probably already good enough in practice. Nonetheless, waiting for the background to actually shut down just seems like good resource management "hygiene" to me.

* Let HostInput/OutputStream provide specialized blocking_* implementations.

* Rename filesystem's `spawn_blocking` -> `run_blocking`

* Implement specialized `blocking_write_and_flush` for FileOutputStream.

- `write` now always spawns the syscall on a background task, regardless of `allow_blocking_current_thread`.
- `blocking_write_and_flush` is newly overridden and continues to do the `allow_blocking_current_thread` trickery that `write` used to do.

* Implement `HostInputStream` for `FileInputStream`.
- `read` always spawns the syscall on a background task, regardless of `allow_blocking_current_thread`.
- `blocking_read` performs the `run_blocking`/`allow_blocking_current_thread` trickery.

* In Preview1 adapter: ignore BlockingMode and always perform blocking I/O, as that's what preview1 did.

* Remove special case for FileInputStream and change InputStream enum to be a type alias, just like OutputStream

* Remove `[method]output-stream.forward` from bindgen config. It does not exist.

* Refactor `blocking_splice` to take advantage of specialized `blocking_read` & `blocking_write_and_flush` implementations

* Defer to regular `read` from within `blocking_read` to reduce duplication of logic.

show more ...


Revision tags: v23.0.2, v23.0.1, v23.0.0
# 0d1efe74 22-Jul-2024 Pat Hickey <[email protected]>

wasmtime-wasi-http: provide Debug impls in all pub types (#8979)

* wasmtime-wasi: derive(Debug) on AbortOnDropJoinHandle

* wasmtime_wasi_http: derive(Debug) on all pub types and their contents


Revision tags: v22.0.0, v21.0.1, v21.0.0, v20.0.2, v20.0.1, v20.0.0, v17.0.3, v19.0.2, v18.0.4, v19.0.1
# 28d2990d 25-Mar-2024 Alex Crichton <[email protected]>

Use a multi-threaded Tokio runtime as a fallback (#8229)

This commit fixes a bug that was introduced in #8190 and brought up on
[Zulip]. In #8190 there was a subtle change in how Tokio and the CLI a

Use a multi-threaded Tokio runtime as a fallback (#8229)

This commit fixes a bug that was introduced in #8190 and brought up on
[Zulip]. In #8190 there was a subtle change in how Tokio and the CLI are
managed, namely that a Tokio runtime is installed at the start of the
CLI to avoid entering/exiting the runtime on each blocking call. This
had a small performance improvement relative to entering/exiting on each
blocking call. This meant, though, that calls previously blocked with
`Runtime::block_on` and now block with `Handle::block_on`. The
[documentation of `Handle::block_on`][doc] has a clause that says that
for single-threaded runtimes I/O and timers won't work.

To fix this issue I've switch the fallback runtime to a multi-threaded
runtime to ensure that I/O and timers continue to work.

[Zulip]: https://bytecodealliance.zulipchat.com/#narrow/stream/219900-wasi/topic/Wasi-http.20requests.20hang/near/429187256
[doc]: https://docs.rs/tokio/latest/tokio/runtime/struct.Handle.html#method.block_on

show more ...


Revision tags: v19.0.0, v18.0.3
# 6e064f4f 05-Mar-2024 Pat Hickey <[email protected]>

wasmtime-wasi: move bindings to its own file, move runtime to its own mod (#8045)

* move bindings to its own file, move runtime to its own mod

* fix