Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,9 @@
],
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,

// Enforce Bazel configuration for rust-analyzer (ignore Cargo)
"rust-analyzer.linkedProjects": [
"rust-project.json"
]
}
12 changes: 12 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Update rust-analyzer config",
"type": "shell",
"command": "bazel run @rules_rust//tools/rust_analyzer:gen_rust_project",
"problemMatcher": [],
"group": "build"
}
]
}
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,17 @@ bazel run //examples/rust/mini-adas:adas_primary

[bazelisk]: https://github.com/bazelbuild/bazelisk

## IDE Setup (rust-analyzer)

Because this project relies exclusively on **Bazel** for Rust, you must generate a `rust-project.json` file for `rust-analyzer` to provide features like code completion and go-to-definition.

Generate the configuration by running:
```sh
bazel run @rules_rust//tools/rust_analyzer:gen_rust_project
```

*Note: If you use VS Code, a build task is included. You can press `Ctrl+Shift+B` (or `Cmd+Shift+B`) and select **Update rust-analyzer config** to regenerate this file anytime you add or modify dependencies in your `BUILD.bazel` files.*

## Profiling

### CPU
Expand Down
Loading