11 Commits

Author SHA1 Message Date
Paolo Tranquilli
49cf1739a4 Rust: expand attribute macros 2025-04-25 16:16:49 +02:00
Paolo Tranquilli
7d312feffe Rust: add local copy of rust.ungrammar
This copy is injected by the existing `//rust/ast-generator:inject-sources`
target, and is useful for development.
2025-03-21 09:48:29 +01:00
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
Paolo Tranquilli
6ded99ccb1 Merge branch 'main' into redsun82/cargo-upgrade 2025-01-09 16:05:48 +01:00
Paolo Tranquilli
c7a9889606 Rust: update rust-analyzer 2025-01-08 11:14:08 +01:00
Paolo Tranquilli
b390fac105 Rust: make ast-generator use mustache templates
This simplifies the code and decouples the code template from the data
that is fed into it.
2025-01-07 18:05:59 +01:00
Paolo Tranquilli
7f5b8fdcec Rust: remove clippy warnings 2024-12-19 12:22:40 +01:00
Paolo Tranquilli
290a1043b1 Rust: fetch ungram and rust-analyzer code instead of checking it in
* The ungram file is now taken from the rust-analyzer dependencies
  pulled in by bazel
* the grammar parsing code is not published, so it must be taken
  directly from rust-analyzer code. That part should be less prone to be
  updated than the ungram file, so it does not necessarily need to be
  in sync with the rust-analyzer version is used elsewhere.
* both need some patches. The former is patched during build, the latter
  during loading in `MODULE.bazel`.
2024-12-18 16:37:24 +01:00
Cornelius Riemenschneider
a66f8209f9 Rust: Vendor 3rdparty dependencies.
We've been observing some performance issues using crate_universe on CI.
Therefore, we're moving to vendor the auto-generated BUILD files
in our repository. This should provide a nice speed boost, while
getting rid of the complexity of the "rust cache" job we've been using
when we had a lot of git dependencies.

This PR includes a vendor script, and I'll put up a CI job internally
that runs that vendor script on Cargo.toml and Cargo.lock changes, to check
that the vendored files are in sync.
2024-11-13 13:22:14 +01:00
Paolo Tranquilli
61c3aa6288 Rust: integrate rust code generation into //rust/codegen 2024-10-08 10:37:53 +02:00
Paolo Tranquilli
96dda8808c Rust: rename generate-schema -> ast-generator 2024-10-08 10:03:00 +02:00