Skip to content

Add Vscode config for rust analyzer to the Readme #1269

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,21 @@ the needed environment variables.
source env.sh
```

#### Configure rust-analyzer for Vscode
If you are using vscode as your code editor, you'll need to add this to you settings.json:
```json
"rust-analyzer.cargo.extraEnv": {
"MLIR_SYS_190_PREFIX": "<path-to-llvm-19>",
"LLVM_SYS_191_PREFIX": "<path-to-llvm-19>",
"TABLEGEN_190_PREFIX": "<path-to-llvm-19>",
}
```
if you are on MacOs, you'll need to add this extra line:
```json
"LIBRARY_PATH": "/opt/homebrew/lib",
```
Without this additional config, rust-analyzer won't be able to work properly

### Make targets:
Running `make` by itself will check whether the required LLVM installation and
corelib is found, and then list available targets.
Expand Down
Loading