From faa203f69cb00b43edb4e21ef737346dd2bd8dfd Mon Sep 17 00:00:00 2001 From: Ryan MacArthur Date: Mon, 29 Jul 2024 18:13:30 -0700 Subject: [PATCH] added note on non-xcode llvm fix on aarch64 Xcode 16.0 with Apple clang version 16.0.0 (clang-1600.0.23.1) I was still getting the no supported targets error, but installing llvm with homebrew worked, so I updated the readme to show how I did it. --- readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/readme.md b/readme.md index f402629..0b414e5 100644 --- a/readme.md +++ b/readme.md @@ -69,6 +69,10 @@ npm install tlsn-js > [!IMPORTANT] > **Note on Rust-to-WASM Compilation**: This project requires compiling Rust into WASM, which needs [`clang`](https://clang.llvm.org/) version 16.0.0 or newer. MacOS users, be aware that Xcode's default `clang` might be older. If you encounter the error `No available targets are compatible with triple "wasm32-unknown-unknown"`, it's likely due to an outdated `clang`. Updating `clang` to a newer version should resolve this issue. +> +> For MacOS aarch64 users, if Apple's clang isnt woking, try installing llvm via homebrew. Then set the following ENVs to get the build to work:
+> ```export AR=/opt/homebrew/opt/llvm/bin/llvm-ar```
+> ```export CC=/opt/homebrew/opt/llvm/bin/clang``` ``` # make sure you have rust installed