Files
codeql/rust/ast-generator
Paolo Tranquilli 45c0c46c9d Cargo: align rust toolchain version with internal repository
Also:
* remove new warnings raised by the rust toolchain
* run new formatting and linting
* update the rust toolchain used by `cargo`

While we keep `bazel` builds using the same toolchain as internally
(now a nightly one), I opted for using a stable toolchain for `cargo`.
The nightly toolchain is only required internally for build reasons, we
should keep not using any unstable rust features in our sources.
2025-08-11 16:45:47 +02:00
..
2025-01-08 11:14:08 +01:00
2025-04-25 16:16:49 +02:00
2025-06-20 17:34:23 +02:00
2025-06-12 13:00:23 +01:00

This crate takes care of generating ast.py in the schema and translate/generate.rs in the extractor.

It uses:

  • rust.ungram from ra_ap_syntax
  • a couple of slightly modified sources from rust-analyzer that are not published.

Both are fetched by bazel while building. In order to have proper IDE support and being able to run cargo tooling in this crate, you can run

bazel run //rust/ast-generator:inject-sources

which will create the missing sources. Be aware that bazel will still use the source taken directly from rust-analyzer, not the one in your working copy. Those should not need to be update often though.