sqlx icon indicating copy to clipboard operation
sqlx copied to clipboard

feat(runtime): Add support for `wasm32-wasip2` compilation target

Open Aditya1404Sal opened this issue 3 months ago • 3 comments

Does your PR solve an issue?

closes #4056

Is this a breaking change?

No, New runtime would run separately, conditional compilation ensures that.

Limitations

This PR adds wasm32 target support for non-TLS backends only (for now since wasi-tls is in phase 1). Some stubs are intentionally left open for further development such as sqlx-core/src/wasm/fs.rs to support future wasi-native file system certificate actions.

Aditya1404Sal avatar Oct 15 '25 06:10 Aditya1404Sal

You're welcome to continue experimenting with this, but there's no point in merging this until it's stabilized as a target for rustc itself. We don't have the bandwidth to maintain support for an experimental target.

abonander avatar Oct 15 '25 08:10 abonander

You're welcome to continue experimenting with this, but there's no point in merging this until it's stabilized as a target for rustc itself. We don't have the bandwidth to maintain support for an experimental target.

Totally fair, I understand it’s still experimental. The WASI Preview 3 target (wasm32-wasip3) is expected to land in the next Rust release or just after that (most probably), but for now I’m using wasm32-wasip2 as the dev target to keep things working.

It’s mostly exploratory right now, but it does feel like something that’ll be quite useful once stabilized.

Aditya1404Sal avatar Oct 15 '25 13:10 Aditya1404Sal

@abonander Would it be alright to keep this PR open as a reference while I continue experimenting, or would you prefer I link to my fork in the relevant issue and close this PR to keep the list clean?

Aditya1404Sal avatar Oct 15 '25 14:10 Aditya1404Sal