Commit Graph

60 Commits

Author SHA1 Message Date
Tom Hvitved
944ebc5267 Rust: Add Callable.getBody() 2025-10-22 16:40:53 +02:00
Geoffrey White
f838494bf0 Rust: Remove empty impls. 2025-08-27 19:58:03 +01:00
Paolo Tranquilli
49bf48eda1 Rust: fix duplicate asm! expressions 2025-08-19 14:01:25 +02:00
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
Paolo Tranquilli
dee1ec31ee Rust: format 2025-07-03 14:42:38 +02:00
Paolo Tranquilli
a72ae9c960 Rust: refactor ast-generator to have all customization at the start 2025-06-24 10:42:16 +02:00
Paolo Tranquilli
d0c7550119 Rust: refactor pre_emit! and post_emit! to a trait 2025-06-24 10:40:33 +02:00
Paolo Tranquilli
377fb00dea Merge branch 'main' into redsun82/cargo-upgrade-3 2025-06-23 12:26:15 +02:00
Paolo Tranquilli
12aa93b578 Rust: suppress TypeAnchor in the generator 2025-06-20 17:43:59 +02:00
Paolo Tranquilli
02b6e856a3 Rust: remove VariantDef 2025-06-20 15:59:18 +02:00
Paolo Tranquilli
52c0028f85 Rust: make Adt be generated 2025-06-20 14:35:08 +02:00
Paolo Tranquilli
dfc03cbad1 Merge branch 'main' into redsun82/rust-extract-libs 2025-06-02 15:33:53 +02:00
Paolo Tranquilli
292cd34efe Rust: fix format 2025-05-26 10:11:55 +02:00
Paolo Tranquilli
e37a24a0d0 Rust: minor refactoring 2025-05-26 09:54:01 +02:00
Paolo Tranquilli
7e917c9c35 Rust: move body skipping logic to code generation 2025-05-22 14:44:42 +02:00
Paolo Tranquilli
a99556e021 Merge branch 'main' into redsun82/rust-expand-attr-macros 2025-05-13 16:21:29 +02:00
Arthur Baars
bc35599f1a Rust: rename MacroStmts to MacroBlockExpr 2025-05-02 16:23:02 +02:00
Paolo Tranquilli
49cf1739a4 Rust: expand attribute macros 2025-04-25 16:16:49 +02:00
Paolo Tranquilli
394f3eb1be Rust: fix ast generator handling renamed enum variants 2025-03-31 13:11:46 +02:00
Paolo Tranquilli
1c89b5185a Rust: rename RecordFieldList to StructFieldList 2025-03-31 13:11:45 +02:00
Paolo Tranquilli
0257b960dc Rust: make property_name work on post-processed class names 2025-03-31 13:11:44 +02:00
Paolo Tranquilli
8bfc1c424e Rust: rename several entities using more accepted names 2025-03-31 13:07:43 +02:00
Paolo Tranquilli
01a69bffbe Merge branch 'main' into redsun82/codegen-rename-dbscheme 2025-03-28 15:06:08 +01:00
Paolo Tranquilli
bd201afa8e Rust: apply formatting and linting 2025-03-21 11:00:30 +01:00
Paolo Tranquilli
8f8fe2f8b6 Rust: silence warning by removing unused generated function 2025-03-21 10:59:39 +01:00
Paolo Tranquilli
b48d9a255e Rust: undo rename of Path::segment to Path::part 2025-03-20 16:30:35 +01:00
Simon Friis Vindum
b2b650ddd3 Rust: Rename classes with Record to Struct 2025-03-19 12:05:39 +01:00
Paolo Tranquilli
689e7b8440 Rust: fix <X as Y> path extraction
This works around a quirk in rust-analyzer's AST generation machinery,
where for an `<X as Y>` path there might be no way to directly get `Y`
from the path segment.
2025-02-24 10:38:15 +01:00
Paolo Tranquilli
71de5a2d3d Rust: remove obsolete comment 2025-02-11 12:06:39 +01:00
Paolo Tranquilli
15a51c33bc Rust: remove obsolete comment 2025-02-07 15:30:24 +01:00
Paolo Tranquilli
f6301b8ea8 Rust: remove unneeded and now broken bazel workaround 2025-02-07 10:59:11 +01:00
Arthur Baars
8d96c87abe Rust: add UseTree::is_star 2025-01-28 16:12:25 +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
b4811906ea Rust: address review 2025-01-07 13:05:19 +01:00
Paolo Tranquilli
10d8aa454b Merge branch 'main' into redsun82/rust-mute-warnings-in-uncompiled-blocks 2025-01-06 10:01:57 +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
Paolo Tranquilli
218bc8069b Rust: exclude extraction of code excluded by cfg 2024-12-18 13:34:40 +01:00
Arthur Baars
c13e173681 Rust: fix codegeneration for AsmOptions 2024-12-17 14:05:53 +01:00
Arthur Baars
8e7eedc172 Update codegen/grammar 2024-12-17 14:05:50 +01:00
Paolo Tranquilli
4c4a8d7619 Rust: extract isRef for SelfParam 2024-12-16 14:24:56 +01:00
Paolo Tranquilli
53503002a1 Merge branch 'main' into redsun82/rust-tweaks 2024-12-04 09:35:01 +01:00
Paolo Tranquilli
277c9f4087 Rust: add back getAttr to ArrayExpr 2024-12-03 16:12:56 +01:00
Paolo Tranquilli
353f1cafe6 Rust: distinguish [a, b] from [a; b]
This splits the `ArrayExpr` class into `ArrayListExpr` and `ArrayRepeatExpr`.
This uses the `synth.from_class` machinery to integrate seamlessly into the
generated code, by hiding the extracted `ArrayExpr` behind an internal class
and replacing it with a hierarchy of those two classes under a new
`ArrayExpr` class.
2024-12-03 15:09:20 +01:00
Paolo Tranquilli
db18d1046b Rust: rename getTy -> getTypeRepr 2024-12-03 11:17:08 +01:00
Paolo Tranquilli
e89cf303e7 Rust: rename TypeRef -> TypeRepr 2024-12-02 17:58:40 +01:00
Paolo Tranquilli
e7ffddd52c Rust: rename all *Type to *TypeRef 2024-12-02 10:13:05 +01:00
Simon Friis Vindum
d30f3e2822 Rust: Renamed expr on CallExpr and LetExpr 2024-11-26 15:22:14 +01:00
Paolo Tranquilli
7a86257968 Merge branch 'main' into redsun82/rust-rename 2024-11-26 10:48:19 +01:00
Paolo Tranquilli
8a01161d4a Rust: rename MatchExpr.expr to scrutinee in all layers
This doesn't require `ql.name` and is simpler while we don't have
to write upgrade scripts. The `ql.name` mechanism might get useful
once we do have to write upgrade scripts, as that doesn't change the
dbscheme.
2024-11-26 10:42:13 +01:00