Skip to content

chore: Refactoring custom wasi implementation - #292

Merged
lxfontes merged 5 commits into
mainfrom
lxfontes/wasi-upstream
Feb 20, 2026
Merged

chore: Refactoring custom wasi implementation#292
lxfontes merged 5 commits into
mainfrom
lxfontes/wasi-upstream

Conversation

@lxfontes

@lxfontes lxfontes commented Feb 19, 2026

Copy link
Copy Markdown
Member

Making so only wasi:sockets is customized.
This allows using the upstream wasmtime_wasi crate while customizing socket behaviour.

The only custom code retained is the socket/loopback networking implementation, which was moved into crates/wash-runtime/src/sockets/.

  • Deleted crates/wasi/ — removed the entire forked crate
  • Created wash-runtime/src/sockets/ — moved custom socket code (TCP, UDP, loopback, address checking) here with granular host trait implementations on ActiveCtx
  • Updated engine/context — replaced single wasi linker setup with per-interface binding

Signed-off-by: Lucas Fontes <lucas@cosmonic.com>
@lxfontes
lxfontes requested a review from a team as a code owner February 19, 2026 21:31
Signed-off-by: Lucas Fontes <lucas@cosmonic.com>
@lxfontes

lxfontes commented Feb 19, 2026

Copy link
Copy Markdown
Member Author

This should help #115 ship

Signed-off-by: Lucas Fontes <lucas@cosmonic.com>
Comment thread crates/wash-runtime/src/engine/mod.rs Outdated
Signed-off-by: Lucas Fontes <lucas@cosmonic.com>

@ricochet ricochet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM main thing we'll need to watch out for when doing wasmtime upgrades is that if new interfaces are added, we'll need to include those in our add_wasi_to_linker

Signed-off-by: Lucas Fontes <lucas@cosmonic.com>
@lxfontes
lxfontes force-pushed the lxfontes/wasi-upstream branch from 50083f7 to d19d747 Compare February 20, 2026 18:27
@lxfontes
lxfontes enabled auto-merge February 20, 2026 18:48
@lxfontes
lxfontes disabled auto-merge February 20, 2026 18:49
@lxfontes
lxfontes added this pull request to the merge queue Feb 20, 2026
Merged via the queue into main with commit e3cbff0 Feb 20, 2026
9 checks passed
@lxfontes
lxfontes deleted the lxfontes/wasi-upstream branch February 20, 2026 19:04
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.

2 participants