I'm trying to build a simple web app using Yew, Diesel, and Postgres. When I run
wasm-pack build --target web --out-name wasm --out-dir ./static
I get the following error:
*rust-lld: error: unable to find library -lpq*
I'm on macOS Catalina. I installed Postgres through Homebrew. My libpq.dylib
file is at /usr/local/lib
.
These are the troubleshooting I've tried already:
- Added
/usr/local/lib
to$PATH
. Mypg_config
showsLIBDIR = /usr/local/lib
. - Re-installed Postgres
- Updated
rustc -nightly
Ideas here are not helpful as well: How can I link a Rust Wasm application with libpq via wasm-pack?
Still it is not resolved. I'd be grateful for any suggestions.