Install brew if you haven't already.
brew install wasmer wapm brew install llvm
cargo install wasm-pack cargo install wai-bindgen-rust
May need to set an environmental variable for your openssl.
export OPENSSL_DIR=/usr/local/opt/openssl@3
Change the above command as needed for your system.
Basic command to build is:
cargo build --release --target wasm32-unknown-unknown
May need to specify your llvm location with additional arguments to build properly:
AR=/usr/local/opt/llvm/bin/llvm-ar CC=/usr/local/opt/llvm/bin/clang cargo build --release --target wasm32-unknown-unknown
Modify the command above as needed for your system.