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
At present you need to be in the `rust-experiment` branch (or a branch on top of that) in both the `semmle-code` and `codeql` repos.
8
+
9
+
TODO: are there any dependencies that aren't already CodeQL dependencies? bazel and rustc?
10
+
11
+
### Building the Rust Extractor
12
+
13
+
This approach uses a released `codeql` version and is simpler to use for QL development. From your `semmle-code` directory run:
14
+
```bash
15
+
bazel run @codeql//rust:rust-installer
16
+
```
17
+
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:
18
+
```
19
+
--search-path Users/YOURUSERNAME/semmle-code/ql
20
+
```
21
+
(or wherever the `ql` directory is on your system)
22
+
23
+
You can now use the Rust extractor e.g. to run Rust tests from the command line or in VSCode.
24
+
25
+
### Building the Rust Extractor (as a sembuild target)
26
+
27
+
This approach allows you to build a Rust extractor with a CLI built from source. From your `semmle-code` directory run:
28
+
```bash
29
+
./build target/intree/codeql-rust
30
+
```
31
+
You can now invoke it directly, for example to run some tests:
32
+
```bash
33
+
./target/intree/codeql-rust/codeql test run ql/rust/ql/test/PATH/TO/TEST/
0 commit comments