Skip to content

Latest commit

 

History

History
48 lines (36 loc) · 1.14 KB

DEVELOPMENT.md

File metadata and controls

48 lines (36 loc) · 1.14 KB

Build on MacOS

Native toolchain setup

On MacOS, you should replace the default llvm with the one from brew:

brew install llvm

We recommend creating a .cargo folder at the root of this repository with the following config.toml file:

[env]
AR = "/opt/homebrew/opt/llvm/bin/llvm-ar"
CC = "/opt/homebrew/opt/llvm/bin/clang"

Additionally, if you're using rust-analyzer in VSCode, you'll want to add the following to your .vscode/settings.json file:

{
  "rust-analyzer.server.extraEnv": {
    "AR": "/opt/homebrew/opt/llvm/bin/llvm-ar",
    "CC": "/opt/homebrew/opt/llvm/bin/clang"
  },
  "rust-analyzer.cargo.target": "wasm32-unknown-unknown"
}

Troubleshooting

rustup installation (using Homebrew)

System-wide installation of rust might conflict with brew-managed rustup installation, see:

To use brew-managed rustup package, you can use:

brew uninstall rust
brew unlink rust
brew install rustup
export PATH="${PATH}:$(brew --prefix rustup)/bin" # .{bash,zsh}rc