diesel_async icon indicating copy to clipboard operation
diesel_async copied to clipboard

Add support for `wasm32-unknown-unknown` target

Open Jaltaire opened this issue 7 months ago • 0 comments

tokio-postgres includes support for targeting wasm32-unknown-unknown, and it would be wonderful to have ORM functionality with Diesel in WASM environments.

This PR enables diesel-async compilation with the postgres feature for the wasm32-unknown-unknown target. Please note that I have not explored what is required to support wasm32-unknown-unknown for other database or connection types.

I am currently using this within a Cloudflare Workers deployment. (As an aside to anyone exploring, I have not yet been able to configure diesel-async to work with Hyperdrive, presumably due to some Postgres feature set that diesel-async leverages and that Hyperdrive is not currently supporting. Using diesel-async with a direct connection string without Hyperdrive, however, works as expected.)

Jaltaire avatar May 08 '25 00:05 Jaltaire