Files
codeql/rust/ast-generator
Paolo Tranquilli 292b962513 Rust: strengthen linting script
* `bazel run //rust/ast-generator:inject-sources` could fail on macOS
  if a non-coreutils `cp` was used
* that is now also run by `lint.py` to ensure the sources cargo needs
  are present
2025-02-20 10:39:14 +01:00
..
2025-01-08 11:14:08 +01:00
2025-02-11 12:06:39 +01:00
2025-02-20 10:39:14 +01:00
2025-01-13 12:43:43 +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.