Skip to content

Commit d1e0d3c

Browse files
authored
Merge pull request #1507 from cryspen/rengine-rename-rust-printer-to-rust-engine
Rust Engine: rename rust printer to rust engine
2 parents 9470219 + dc3abb5 commit d1e0d3c

File tree

18 files changed

+23
-23
lines changed

18 files changed

+23
-23
lines changed

.github/workflows/clippy_rust_engine.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
- uses: actions/checkout@v4
1616
- name: Run clippy
1717
run: |
18-
cargo clippy -p rust-printer -- --no-deps
18+
cargo clippy -p hax-rust-engine -- --no-deps

Cargo.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ members = [
1414
"engine/names",
1515
"engine/names/extract",
1616
"hax-types",
17-
"rust-printer",
18-
"rust-printer/macros",
17+
"rust-engine",
18+
"rust-engine/macros",
1919
]
20-
exclude = ["tests", "rustc-coverage-tests", "rust-printer/tests"]
20+
exclude = ["tests", "rustc-coverage-tests", "rust-engine/tests"]
2121
default-members = [
2222
"frontend/exporter",
2323
"frontend/exporter/options",
@@ -81,7 +81,7 @@ hax-lib-macros-types = { path = "hax-lib/macros/types", version = "=0.3.1" }
8181
hax-lib = { path = "hax-lib", version = "=0.3.1" }
8282
hax-engine-names = { path = "engine/names", version = "=0.3.1" }
8383
hax-types = { path = "hax-types", version = "=0.3.1" }
84-
rust-printer = { path = "rust-printer" }
84+
hax-rust-engine = { path = "rust-engine" }
8585

8686
[workspace.metadata.release]
8787
owners = ["github:cryspen:tools"]

cli/subcommands/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ extension-traits = "1.0.1"
4848
serde.workspace = true
4949
serde_json.workspace = true
5050
hax-types.workspace = true
51-
rust-printer.workspace = true
51+
hax-rust-engine.workspace = true
5252
schemars.workspace = true
5353
hax-frontend-exporter.workspace = true
5454
hax-lib-macros-types = { workspace = true, features = ["schemars"] }

cli/subcommands/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ fn json_schema_static_asset() {
2424
hax_types::engine_api::protocol::FromEngine,
2525
hax_types::engine_api::protocol::ToEngine,
2626
hax_lib_macros_types::AttrPayload,
27-
rust_printer::ast::Item,
27+
hax_rust_engine::ast::Item,
2828
));
2929
schema.schema.metadata.get_or_insert_default().id = Some(hax_types::HAX_VERSION.into());
3030
serde_json::to_writer(

docs/frontend/evaluation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,12 +149,12 @@ These tests aim at increasing the confidence in the ability of hax frontend to h
149149

150150
### Rust printer testing
151151

152-
This method aims at testing the quality of hax frontend's output. It uses a tool that is under development that we call the Rust printer.
152+
This method aims at testing the quality of hax frontend's output. It uses the Rust hax engine.
153153

154154
This tool (written in Rust) takes the output of hax frontend (a json file describing the content of a Rust crate), it imports it as an AST (similar to the hax engine AST), and then prints this AST in Rust syntax.
155155

156156
If the Rust code we get out of this tool is equivalent to the Rust code it was given as input, then this means hax frontend correctly extracted the input code without losing or altering any information.
157157

158158
There is no easy way of testing the full input/output equivalence so the methodology here is to test that the resulting code behaves the same as the input code with respect to relevant test cases.
159159

160-
This work is available in the `rust-printer` folder. In the `tests` subfolder, an input file is available with tests for all Rust constructs supported by the printer (currently functions and expressions). For now these tests pass after extracting and printing the file with hax frontend and the Rust printer. This means that for the Rust constructs covered by the printer and the test file, hax frontend's extraction is correct. However this still needs to be extended to test more Rust constructs.
160+
This work is available in the `hax-rust-engine` folder. In the `tests` subfolder, an input file is available with tests for all Rust constructs supported by the printer (currently functions and expressions). For now these tests pass after extracting and printing the file with hax frontend and the Rust printer. This means that for the Rust constructs covered by the printer and the test file, hax frontend's extraction is correct. However this still needs to be extended to test more Rust constructs.

rust-printer/Cargo.toml renamed to rust-engine/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "rust-printer"
2+
name = "hax-rust-engine"
33
version.workspace = true
44
authors.workspace = true
55
license.workspace = true

rust-printer/README.md renamed to rust-engine/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ This crate should implement an AST for which:
66
5. This AST should be suitable for AST transformations.
77

88
## Usage
9-
`rust-printer` expects it's stdin to be the output of `cargo hax json`, e.g.:
9+
`hax-rust-engine` expects it's stdin to be the output of `cargo hax json`, e.g.:
1010
```bash
11-
cargo hax json -o - | rust-printer > output.rs
11+
cargo hax json -o - | hax-rust-engine > output.rs
1212
```
1313

1414
## Test
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)