Skip to content

WASI P3 migration#3638

Draft
vigoo wants to merge 40 commits into
mainfrom
wasi-p3
Draft

WASI P3 migration#3638
vigoo wants to merge 40 commits into
mainfrom
wasi-p3

Conversation

@vigoo

@vigoo vigoo commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Long-running migration branch, do not merge yet

@netlify

netlify Bot commented Jun 16, 2026

Copy link
Copy Markdown

Deploy Preview for golemcloud canceled.

Name Link
🔨 Latest commit 0c21b3a
🔍 Latest deploy log https://app.netlify.com/projects/golemcloud/deploys/6a4f86a6bf6204000855f22d

vigoo and others added 12 commits July 3, 2026 09:31
- Pin wasmtime, wasmtime-wasi and wasmtime-wasi-http to =46.0.1
  (component-model-async-bytes feature renamed to component-model-bytes)
- Update all WIT trees from wasi 0.3.0-rc-2026-03-15 to the final 0.3.0
  interfaces (root wit/, golem-common, golem-cli, and the SDK WIT copies)
- Adapt to the v46 host APIs: trait-generic *WithStore<U> impls, BytesMut
  stream buffers, ComponentExtern.ty in agent extraction
- golem-rust SDK: wasip3 0.7.0 and 0.3.0 WIT remaps
- http-tests test component: wasi-fetch 0.2.0 (targets final wasi:http@0.3.0
  and wit-bindgen 0.58, fixing the never-polled request-body upload task of
  wasi-fetch 0.1.3 / wit-bindgen#1305)

Amp-Thread-ID: https://ampcode.com/threads/T-019f22a8-4db2-75fb-8967-5d612dccffe0
Co-authored-by: Amp <amp@ampcode.com>
Wasmtime runs sync-lowered host calls and async resource limiters through
block_on on the store's fiber; while such a call awaits, the store event loop
cannot poll any store-polled host future (wasmtime#11869, wasmtime#11870). Any
async lock that such a host future holds across an await - or is merely queued
on, since tokio's fair mutex hands ownership to woken-but-unpolled waiters -
deadlocks the whole store as soon as fiber-side host code waits on the same
lock. This intermittently hung http_client_using_reqwest_async_parallel.

Shared-state paths reachable from both contexts no longer use await-crossing
locks:

- PrimaryOplog, ForwardingOplog and EphemeralOplog are actors now: the state
  is exclusively owned by an independent task processing a FIFO job channel,
  and callers only await oneshot replies
- DurableWorkerCtx::increase_memory no longer awaits in the memory.grow
  limiter; the GrowMemory hint and global memory admission run on a detached
  task, and on admission failure the worker is restarted, reacquiring its
  memory through the startup admission path
- commit_oplog_and_update_state sends the status-change notification from a
  detached task instead of queueing on the instance lock
- the blob and compressed oplog archives no longer hold their internal locks
  across storage IO
- the replay seen-log set moved out of the replay cursor lock into a
  synchronous mutex, so stdio host calls never queue behind cursor-advance
  transactions
- LazyPromiseService clones the implementation Arc out instead of holding its
  RwLock across the delegated call

Amp-Thread-ID: https://ampcode.com/threads/T-019f22a8-4db2-75fb-8967-5d612dccffe0
Co-authored-by: Amp <amp@ampcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant