Adapted from this article Using LLVM from Rust to generate WebAssembly binaries
Just prints "Hello World" in an executable, currently set up for arm64, but should be straight forward to set up for other architectures
Install LLVM 13
brew install llvm@13
Set LLVM_SYS_130_PREFIX variable
export LLVM_SYS_130_PREFIX=/PATH/TO/LLVM13/VERSION
We can then generate the executable
cargo run
Then run the executable
./main
Which should print "Hello world!"