Skip to content

[Discussion] Add wasm32-wasip3 compilation target support to runtime dispatcher & wasi-socket support #4056

@Aditya1404Sal

Description

@Aditya1404Sal

I have found these related issues/pull requests

latest WIP at : https://github.com/Aditya1404Sal/sqlx/tree/latest/wasip3
Wasip3 : https://crates.io/crates/wasip3
Early POC : https://github.com/rvolosatovs/sqlx/tree/feat/wasip3

Description

since Webassembly is almost close to releasing wasi-p3, it will intrduce native async and extended socket support, which will allow users to basically replace their runtime layer with wasi equivalents to directly compile their clients over to .wasm code, in fact a pre-release version of it's rust bindings are available here : https://crates.io/crates/wasip3

An early POC was created here : https://github.com/rvolosatovs/sqlx/tree/feat/wasip3
but since it was an early draft, it utilized some abstractions on the futures crates which will need to be migrated over to wit_bindgen primitives.

This is more of a discussion Item since wasip3 is still brand new and an official release is still underway.

Prefered solution

In our use case, we were hoping that the sqlx client could be compiled to a wasm32-wasip3 target enabling the direct use of mysql/postgres/sqlite sqlx drivers in webassembly components.
Currently WIP at : https://github.com/Aditya1404Sal/sqlx/tree/latest/wasip3

Is this a breaking change? Why or why not?

Not a breaking change, Conditional compilation for a new target and feature flag shouldn't cause any breaking changes. Tokio and other runtimes expected to stay unaffected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions