You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a workspace with a frontend and a server, and I'm trying to add a third crate, common, which shares some types between them.
common requires a dependency on sqlx, so that I can derive sqlx::Type on an enum. Whilst the backend has no problem with this, the frontend is compiled for the wasm32-unknown-unknown target, which fails to compile sqlx, specifically stumbling over the socket2 crate.
Is it impossible to structure my project in this way, as sqlx won't compile in a wasm environement?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I have a workspace with a
frontend
and aserver
, and I'm trying to add a third crate,common
, which shares some types between them.common
requires a dependency onsqlx
, so that I can derivesqlx::Type
on anenum
. Whilst the backend has no problem with this, the frontend is compiled for thewasm32-unknown-unknown
target, which fails to compilesqlx
, specifically stumbling over thesocket2
crate.Is it impossible to structure my project in this way, as
sqlx
won't compile in a wasm environement?Beta Was this translation helpful? Give feedback.
All reactions