Skip to content

Commit a400780

Browse files
committed
Roll rustc_private toolchain to nightly-2025-01-01
Port refactoring, analysis, PDG, and instrumentation to the Rust 1.85-era compiler with representative Rust 2024 rewrite and runtime coverage. Retain workspace edition 2021, published MSRV 1.70, and separate generated 2021/2024 compiler pins. Replace private compiler layout ownership with public callbacks, preserve AST/HIR identity and transformed macro fragments, adapt binder and MIR handling, and retain instrumentation permissions and unwind behavior. Use equivalent exposed-provenance casts for generated edition 2021 code. Validate against an isolated baseline: 270 workspace tests (all 234 prior passing identities retained), 29 refactor shell cases, 148 translator successes with the same two expected failures, and json-c/Lua end-to-end workflows. Keep the existing PDG Miri skip and documented baseline limits.
1 parent e1e5bf2 commit a400780

171 files changed

Lines changed: 7522 additions & 3816 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci-c2rust-postprocess.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ jobs:
4949

5050
- name: Install Rust toolchains
5151
run: |
52-
rustup toolchain install nightly-2023-04-15 \
52+
rustup toolchain install nightly-2025-01-01 \
5353
--profile minimal --component rustfmt,rustc-dev
54+
rustup toolchain install nightly-2023-04-15 \
55+
--profile minimal --component rustfmt
5456
5557
- name: Provision Debian Packages
5658
run: |

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,10 @@ jobs:
6060
# Run after `rust-cache` so that this is cached.
6161
- name: Install Rust toolchains
6262
run: |
63-
rustup toolchain install nightly-2023-04-15 \
63+
rustup toolchain install nightly-2025-01-01 \
6464
--profile minimal --component rustfmt,rustc-dev
65+
rustup toolchain install nightly-2023-04-15 \
66+
--profile minimal --component rustfmt
6567
rustup toolchain install nightly-2026-03-03 \
6668
--profile minimal --component rustfmt
6769

.github/workflows/internal-testsuite.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,10 @@ jobs:
6565

6666
- name: Install Rust toolchains
6767
run: |
68-
rustup toolchain install nightly-2023-04-15 \
68+
rustup toolchain install nightly-2025-01-01 \
6969
--profile minimal --component rustfmt,rustc-dev
70+
rustup toolchain install nightly-2023-04-15 \
71+
--profile minimal --component rustfmt
7072
7173
- name: Provision Debian Packages
7274
run: |

LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
1414
Portions of C2Rust are derived from packages written by third parties. The following third party packages are included, and carry their own copyright notices and license terms:
1515

1616
* c2rust-ast-printer. Dual-licensed under Apache 2.0 and MIT, see c2rust-ast-printer/COPYRIGHT for details.
17+
* c2rust-refactor's copied Rust AST walkers. MIT-licensed, see c2rust-refactor/src/ast_manip/fold/COPYRIGHT for details.

README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
[Latest Version]: https://img.shields.io/crates/v/c2rust.svg
1010
[crates.io]: https://crates.io/crates/c2rust
11-
[rustc Version]: https://img.shields.io/badge/rustc-nightly--2023--04--15-lightgrey.svg "rustc nightly-2023-04-15"
11+
[rustc Version]: https://img.shields.io/badge/rustc-nightly--2025--01--01-lightgrey.svg "rustc nightly-2025-01-01"
1212

1313
<!-- ANCHOR: intro -->
1414

@@ -161,12 +161,16 @@ You should also set `LLVM_CONFIG_PATH` accordingly if required as described abov
161161

162162
`c2rust` and `c2rust-transpile` are installed by default and can be built on `stable` `rustc`.
163163
The other tools, such as `c2rust-refactor`, use `rustc` internal APIs, however,
164-
and are thus pinned to a specific `rustc` `nightly` version: `nightly-2023-04-15`.
164+
and are thus pinned to a specific `rustc` `nightly` version: `nightly-2025-01-01`.
165165
These are also not published to `crates.io`.
166+
The workspace remains edition 2021. Generated code uses separate toolchains:
167+
`nightly-2023-04-15` for edition 2021 and `nightly-2026-03-03` for edition 2024,
168+
which retain the SIMD and C variadic APIs emitted for each edition.
169+
The standalone programs under `tools/` use their own stable toolchain.
166170
To install these, these can be installed with `cargo` with the pinned nightly. For example,
167171

168172
```sh
169-
cargo +nightly-2023-04-15 install --locked --git https://github.com/immunant/c2rust.git c2rust-refactor
173+
cargo +nightly-2025-01-01 install --locked --git https://github.com/immunant/c2rust.git c2rust-refactor
170174
```
171175

172176
However, we recommend installing them from a full checkout,

0 commit comments

Comments
 (0)