Run Rust integration build analysis
Klocwork 2026.1 introduces partial support for Rust, expanding the ability to analyze modern, memory-safe code bases. Rust analysis is delivered through an add‑on package called kwrust.
Rust projects can be uploaded to Validate by default. However, the kwrust add‑on can only be installed on Klocwork build tools or command line installations for version 2026.1 or later, not on any existing Validate server.
Klocwork provides two complementary sets of checkers for Rust projects:
-
Native Rust checkers
These checkers are developed and maintained by Klocwork and use the same analysis engine that powers our C/C++ and other language checkers. They run on the compiled crate and require the project to build successfully before they can report issues. For more information, see Rust checker reference.
-
Clippy-based checkers
Klocwork also integrates Clippy, Rust's official linter which is maintained by The Rust Project Contributors. Since Clippy is an external tool, Klocwork maps each Clippy lint into its own checker under the naming pattern:
RS.CLIPPY.<LINT_NAME_IN_UPPERCASE>. For more information, see Clippy-based checkers.
Prerequisites
Before enabling Rust support, ensure that you:
-
Install Klocwork build tools or command line tools (version 2026.1 or later).
-
Download the
kwrustadd‑on that matches your platform (Linux or Windows). -
Back up your customized
config/kwfilter.conffile.Installing the add‑on will overwrite your existingconfig/kwfilter.confwith a version that enables Rust compiler mappings. If you've customized this file, back it up before extracting the package to your build or command line tools.
Limitations
-
Rust support is currently an experimental feature. Results found by our analysis engine will be improved in the future.
-
Because Rust support is still experimental, we recommend returning to a standard Build Tools installation (without the
kwrustadd‑on) once you finish evaluating Rust analysis. Alternatively, you can disable all Rust and Clippy checkers in Validate or through thepconffile. This helps ensure maximum stability in your regular, non-Rust analysis workflows. -
Klocwork currently recompiles your project in place (that is, to the same output directories) using the packaged Rust compiler. This means analysis will overwrite some of your project's build artifacts. To work around this issue, see Perform advanced configuration.
-
Native Rust checkers (non-Clippy) require error-free compilation. If a crate fails to compile, Klocwork can only report Clippy results.
-
Incremental and differential analysis modes are not fully validated. For best results, use full analysis mode:
kwinject --overwrite <…> kwbuildproject --force <…> kwcheck run --rebuild kwciagent run --rebuild
-
The
kwrustadd-on includes Rust compiler version 1.89. Projects should ideally build usingcargo +1.89 build. Other compiler versions may work but are not guaranteed. -
Cross-language analysis (such as Rust calling external C functions) is not yet supported.
-
Future versions will avoid modifying the original build output.
-
Metrics such as Rust file counts, lines of code, and comment counts are not generated yet. As a result, the Category Details report cannot display Rust‑specific metrics.
Next step: