Skip to content

Commit d39c8d1

Browse files
authored
Merge pull request #20574 from geoffw0/rustga3
Rust: Docs updates
2 parents 2d9b249 + 1c8ee0a commit d39c8d1

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

docs/codeql/codeql-overview/system-requirements.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ For Ruby extraction:
4242

4343
- On Windows, the ``msvcp140.dll`` must be installed and available on the system. This can be installed by downloading the appropriate Microsoft Visual C++ Redistributable for Visual Studio.
4444

45+
For Rust extraction:
46+
47+
- ``rustup`` and ``cargo`` must be installed.
48+
4549
For Java extraction:
4650

4751
- There must be a ``java`` or ``java.exe`` executable available on the ``PATH``, and the ``JAVA_HOME`` environment variable must point to the corresponding JDK's home directory.

docs/codeql/reusables/supported-frameworks.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,6 @@ Rust built-in support
313313
Provided by the current versions of the
314314
CodeQL query pack ``codeql/rust-queries`` (`changelog <https://github.com/github/codeql/tree/codeql-cli/latest/rust/ql/src/CHANGELOG.md>`__, `source <https://github.com/github/codeql/tree/codeql-cli/latest/rust/ql/src>`__)
315315
and the CodeQL library pack ``codeql/rust-all`` (`changelog <https://github.com/github/codeql/tree/codeql-cli/latest/rust/ql/lib/CHANGELOG.md>`__, `source <https://github.com/github/codeql/tree/codeql-cli/latest/rust/ql/lib>`__).
316-
All support is experimental.
317316

318317
.. csv-table::
319318
:header-rows: 1

docs/codeql/writing-codeql-queries/creating-path-queries.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ For more language-specific information on analyzing data flow, see:
3333
- ":ref:`Analyzing data flow in JavaScript/TypeScript <analyzing-data-flow-in-javascript-and-typescript>`"
3434
- ":ref:`Analyzing data flow in Python <analyzing-data-flow-in-python>`"
3535
- ":ref:`Analyzing data flow in Ruby <analyzing-data-flow-in-ruby>`"
36+
- ":ref:`Analyzing data flow in Rust <analyzing-data-flow-in-rust>`"
3637
- ":ref:`Analyzing data flow in Swift <analyzing-data-flow-in-swift>`"
3738

3839
Path query examples
@@ -59,7 +60,7 @@ You should use the following template:
5960
*/
6061
6162
import <language>
62-
// For some languages (Java/C++/Python/Swift) you need to explicitly import the data flow library, such as
63+
// For some languages (Java/C++/Python/Rust/Swift) you need to explicitly import the data flow library, such as
6364
// import semmle.code.java.dataflow.DataFlow or import codeql.swift.dataflow.DataFlow
6465
...
6566
@@ -124,7 +125,7 @@ Declaring sources and sinks
124125
You must provide information about the ``source`` and ``sink`` in your path query. These are objects that correspond to the nodes of the paths that you are exploring.
125126
The name and the type of the ``source`` and the ``sink`` must be declared in the ``from`` statement of the query, and the types must be compatible with the nodes of the graph computed by the ``edges`` predicate.
126127

127-
If you are querying C/C++, C#, Go, Java/Kotlin, JavaScript/TypeScript, Python, or Ruby code (and you have used ``import MyFlow::PathGraph`` in your query), the definitions of the ``source`` and ``sink`` are accessed via the module resulting from the application of the ``Global<..>`` module in the data flow library. You should declare both of these objects in the ``from`` statement.
128+
If you are querying C/C++, C#, Go, Java/Kotlin, JavaScript/TypeScript, Python, Ruby, or Rust code (and you have used ``import MyFlow::PathGraph`` in your query), the definitions of the ``source`` and ``sink`` are accessed via the module resulting from the application of the ``Global<..>`` module in the data flow library. You should declare both of these objects in the ``from`` statement.
128129
For example:
129130

130131
.. code-block:: ql
@@ -145,7 +146,7 @@ The configuration module must be defined to include definitions of sources and s
145146
- ``isSource()`` defines where data may flow from.
146147
- ``isSink()`` defines where data may flow to.
147148

148-
For more information on using the configuration class in your analysis see the sections on global data flow in ":ref:`Analyzing data flow in C/C++ <analyzing-data-flow-in-cpp>`," ":ref:`Analyzing data flow in C# <analyzing-data-flow-in-csharp>`," and ":ref:`Analyzing data flow in Python <analyzing-data-flow-in-python>`."
149+
For more information on using the configuration class in your analysis see the sections on global data flow in ":ref:`Analyzing data flow in C/C++ <analyzing-data-flow-in-cpp>`," ":ref:`Analyzing data flow in C# <analyzing-data-flow-in-csharp>`," ":ref:`Analyzing data flow in Python <analyzing-data-flow-in-python>`," and ":ref:`Analyzing data flow in Rust <analyzing-data-flow-in-rust>`."
149150

150151
You can also create a configuration for different frameworks and environments by extending the ``Configuration`` class. For more information, see ":ref:`Types <defining-a-class>`" in the QL language reference.
151152

0 commit comments

Comments
 (0)