You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Rust support for CodeQL is experimental. No support is offered. QL and database interfaces will change and break without notice or deprecation periods.
5
+
6
+
## Development
7
+
8
+
### Dependencies
9
+
10
+
If you don't have the `semmle-code` repo you may need to install Bazel manually, e.g. from https://github.com/bazelbuild/bazelisk.
11
+
12
+
### Building the Rust Extractor
13
+
14
+
This approach uses a released `codeql` version and is simpler to use for QL development. From your `semmle-code` directory run:
15
+
```bash
16
+
bazel run @codeql//rust:rust-installer
17
+
```
18
+
You now need to create a [per-user CodeQL configuration file](https://docs.github.com/en/code-security/codeql-cli/using-the-advanced-functionality-of-the-codeql-cli/specifying-command-options-in-a-codeql-configuration-file#using-a-codeql-configuration-file) and specify the option:
19
+
```
20
+
--search-path PATH/TO/semmle-code/ql
21
+
```
22
+
(wherever the `codeql` checkout is on your system)
23
+
24
+
You can now use the Rust extractor e.g. to run Rust tests from the command line or in VSCode.
25
+
26
+
### Building the Rust Extractor (as a sembuild target)
27
+
28
+
This approach allows you to build a Rust extractor with a CLI built from source. From your `semmle-code` directory run:
29
+
```bash
30
+
./build target/intree/codeql-rust
31
+
```
32
+
You can now invoke it directly, for example to run some tests:
33
+
```bash
34
+
./target/intree/codeql-rust/codeql test run ql/rust/ql/test/PATH/TO/TEST/
0 commit comments