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
Copy file name to clipboardExpand all lines: content/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages.md
+21-2Lines changed: 21 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,8 +49,8 @@ You can use dependency caching with {% data variables.product.prodname_codeql %}
49
49
The {% data variables.product.prodname_codeql %} action supports three different build modes for compiled languages:
50
50
51
51
*`none` - the {% data variables.product.prodname_codeql %} database is created directly from the codebase without building the codebase (supported for all interpreted languages, and additionally supported for {% data variables.code-scanning.no_build_support %}).
52
-
*`autobuild` - {% data variables.product.prodname_codeql %} detects the most likely build method and uses this to attempt to build the codebase and create a database for analysis (supported for all compiled languages).
53
-
*`manual` - you define the build steps to use for the codebase in the workflow (supported for all compiled languages{% ifversion codeql-rust-public-preview %}, except Rust{% endif %}).
52
+
*`autobuild` - {% data variables.product.prodname_codeql %} detects the most likely build method and uses this to attempt to build the codebase and create a database for analysis (supported for {% data variables.code-scanning.autobuild_support %}).
53
+
*`manual` - you define the build steps to use for the codebase in the workflow (supported for {% data variables.code-scanning.manual_build_support %}).
54
54
55
55
### Comparison of the build modes
56
56
@@ -251,6 +251,9 @@ If you added manual build steps for compiled languages and {% data variables.pro
251
251
* [Building C#](#building-c)
252
252
* [Building Go](#building-go)
253
253
* [Building Java and Kotlin](#building-java-and-kotlin)
254
+
{% ifversion codeql-rust-available %}
255
+
* [Building Rust](#building-rust)
256
+
{% endif %}
254
257
* [Building Swift](#building-swift)
255
258
256
259
> [!NOTE]
@@ -494,6 +497,22 @@ You will also need to install the build system (for example `make`, `cmake`, `ba
494
497
495
498
Windows runners require `powershell.exe` to be on the `PATH`.
496
499
500
+
{% ifversion codeql-rust-available %}
501
+
502
+
## Building Rust
503
+
504
+
{% data variables.product.prodname_codeql %} supports build mode `none` for Rust code.
505
+
506
+
### No build for Rust
507
+
508
+
{% data variables.product.prodname_codeql %} uses `rust-analyzer` to compile and run build scripts (`build.rs` files) and compile macro code, but does not invoke a full build. A database is created from all Rust files present. A `Cargo.toml` or `rust-project.json` file must be present.
509
+
510
+
### Runner requirements for Rust
511
+
512
+
Rust analysis requires `rustup` and `cargo` to be installed.
513
+
514
+
{% endif %}
515
+
497
516
## Building Swift
498
517
499
518
{% data variables.product.prodname_codeql %} supports build modes `autobuild` or `manual` for Swift code.
Copy file name to clipboardExpand all lines: content/code-security/codeql-cli/getting-started-with-the-codeql-cli/preparing-your-code-for-codeql-analysis.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -199,7 +199,7 @@ In addition, for {% data variables.code-scanning.no_build_support %}, there is a
199
199
200
200
### Automatically detecting the build system
201
201
202
-
The {% data variables.product.prodname_codeql_cli %} includes autobuilders for {% data variables.code-scanning.compiled_languages %} code. {% data variables.product.prodname_codeql %} autobuilders allow you to build projects for compiled languages without specifying any build commands. When an autobuilder is invoked, {% data variables.product.prodname_codeql %} examines the source for evidence of a build system and attempts to run the optimal set of commands required to extract a database. For more information, see [AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-autobuild).
202
+
The {% data variables.product.prodname_codeql_cli %} includes autobuilders for {% data variables.code-scanning.autobuild_support %} code. {% data variables.product.prodname_codeql %} autobuilders allow you to build projects for compiled languages without specifying any build commands. When an autobuilder is invoked, {% data variables.product.prodname_codeql %} examines the source for evidence of a build system and attempts to run the optimal set of commands required to extract a database. For more information, see [AUTOTITLE](/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages#about-autobuild).
203
203
204
204
An autobuilder is invoked automatically when you execute `codeql database create` for a compiled language if you don’t include a
205
205
`--command` option or set `--build-mode none`. For example, for a Swift codebase, you could simply run:
@@ -268,6 +268,16 @@ The following examples are designed to give you an idea of some of the build com
Copy file name to clipboardExpand all lines: content/get-started/learning-about-github/github-language-support.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,4 +55,4 @@ Some features are supported for additional languages or package managers. If you
55
55
> {% ifversion fpt or ghec %}The language support for {% data variables.product.prodname_copilot %} varies depending on the volume and diversity of training data for that language.{% endif %}
56
56
> The support of Gradle for the dependency graph and {% data variables.product.prodname_dependabot_alerts %} is limited to the upload of data obtained using the {% data variables.dependency-submission-api.name %}.
57
57
58
-
[^1]: {% ifversion codeql-rust-public-preview %}PHP and Scala {% else %}PHP, Rust, and Scala {% endif %}are supported for code scanning by third-party actions, but not by {% data variables.product.prodname_codeql %}.
58
+
[^1]: {% ifversion codeql-rust-available %}PHP and Scala {% elsif codeql-rust-public-preview %}PHP and Scala {% else %}PHP, Rust, and Scala {% endif %}are supported for code scanning by third-party actions, but not by {% data variables.product.prodname_codeql %}.
Copy file name to clipboardExpand all lines: data/reusables/code-scanning/autobuild-add-build-steps.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,4 +3,4 @@ If `autobuild` fails, or you want to analyze a different set of source files fro
3
3
* If your workflow specifies a build mode for the language, change the build mode to `manual`.
4
4
* If your workflow contains an `autobuild` step, remove or comment out the `autobuild` step in the workflow.
5
5
6
-
Then uncomment the `run` step and manually specify the build process to use. For {% data variables.code-scanning.compiled_languages %}, {% data variables.product.prodname_codeql %} will analyze whatever source code is built by your specified build steps.
6
+
Then uncomment the `run` step and manually specify the build process to use. For {% data variables.code-scanning.manual_build_support %}, {% data variables.product.prodname_codeql %} will analyze whatever source code is built by your specified build steps.
0 commit comments