New
v0.22.0
What's Changed
- Update c2rust-refactor to nightly-2022-08-08 by @ahomescu in #1328
- refactor: fix some
Cargo.tomlthings by @kkysen in #1404 - refactor: set
rustc_private = trueinCargo.tomlforrust-analyzerby @kkysen in #1406 - README: Update acknowledgements by @thedataking in #1413
- ast-exporter: fix crash on cast of empty initializer by @fw-immunant in #1412
- transpile: tests: specify
--edition 2021forrustfmt, too by @kkysen in #1409 - bitfields-derive: strip
::prefix from type if present by @Rua in #1411 - fix removing literal suffixes from vec![10u32, 20u32, 30u32] by @oinoom in #1368
- Fix the reorganize_definitions refactoring by @ahomescu in #1364
- transpile: search for
llvm-config-21andllvm-config-20by @kkysen in #1415 - ci: keep
RUSTFLAGSconsistent to not rebuild everything by @kkysen in #1423 - pdg: check in
Cargo.locks for analysis tests by @kkysen in #1429 - c2rust-refactor: generate artifacts by @oinoom in #1425
- transpile: update generated nightly to
nightly-2023-04-15(1.70.0) forsyn v2.0.107andcargo's sparse registry by @kkysen in #1422 - tests: copy
generated-rust-toolchain.tomlto test directories by @kkysen in #1430 - transpile: update dependencies in generated
Cargo.tomlby @kkysen in #1418 - refactor: update to
cargo v0.65, matching our pinned nightly of Rust 1.65 by @kkysen in #1421 - transpile: remove
~inCargo.toml.hbscausing trailing whitespace to be removed by @kkysen in #1419 - ci: set
C2RUST_DIRforc2rust-testsuiteso that current versions of c2rust crates are used by @kkysen in #1420 - exporter: print src loc for all warnings, including in type encoding by @kkysen in #1416
- transpile, analyze: remove
#![feature(label_break_value)], stabilized in Rust 1.65 (our current nightly) by @kkysen in #1431 - transpile: Always use absolute paths when referring to crates by @Rua in #1408
- refactor: help the user find a transform by @fw-immunant in #1427
- transpile: Extend lifetime of compound literals whose address is taken by @Rua in #1407
- exporter: tag all SVE types w/
TagSve(unhandled) by @kkysen in #1417 - transpile: Use literal directly when taking address of string literal by @Rua in #1434
- Fix NodeId->HirId lookups by carrying structural context by @oinoom in #1445
- transpile: Avoid unnecessary parentheses around calls or fields by @Rua in #1449
- transpile: add
--reorganize-definitionsback by @kkysen in #1454 - docs: update out-of-date info in
README.md,docs/, andmanual/by @kkysen in #1459 - ci: install generated nightly toolchain as well by @kkysen in #1460
- refactor: fix
canonicalize_refsin libxml transforms by @oinoom in #1450 - readme: update section on cross-transpilation to explain how to cross-arch transpile by @kkysen in #1456
- transpile: fixes before re-enabling
--reorganize-definitionsby @kkysen in #1452 - ci: Add runner name to rust-cache key by @ahomescu in #1466
- transpile: defer+cache imports alongside zero initializers by @fw-immunant in #1455
- ci: run
testsuite/test.pyfrom insidetestsuiteso that thepyproject.tomlis loaded correctly by @kkysen in #1468 - ci: remove
scan-buildinstall by @kkysen in #1461 - refactor: Fix name collisions in
reorganize_definitionsby @ahomescu in #1465 - transpile: fix out-of-range literals by @kkysen in #1442
- ci: enable new
libmcstest from c2rust-testsuite by @kkysen in #1470 - Fix type error in generated Rust when indexing typedef'd pointers by @fw-immunant in #1471
- refactor: Fix
remove_unnecessary_refsto ignore pointers by @ahomescu in #1467 - Fix Rust compiler version mismatches in c2rust-refactor, rebased by @ahomescu in #1472
- c2rust-refactor: Structurally match types more conservatively by comparing visibility by @ahomescu in #1474
- Fix quickcheck-derived test case for refactor casts by @fw-immunant in #1392
- Add the testsuite as a subtree of c2rust by @ahomescu in #1485
- Enable more refactor transforms on lua by @ahomescu in #1486
- transpile: Add varargs snapshot test by @Rua in #1491
- Add index to name of refactor diff files to keep track of order of application by @ahomescu in #1487
- transpile: Split
convert_pointerinto two functions for easier reuse by @Rua in #1478 - transpile: Factor out common function for address-of and array-decay by @Rua in #1446
- transpile: Resolve expression first in address-of and array-decay by @Rua in #1481
- transpile: Translate null pointers with
ptr::null[_mut]by @Rua in #1479 - transpile: Rework
is_va_listfor better accuracy by @Rua in #1439 - transpile: Translate
va_listwith correct types by @Rua in #1443 - transpile: Split off new pointers.rs module by @Rua in #1495
- transpile: Do not leak
mainargument strings by @Rua in #1447 - transpile: tests: rename
main.ctomain_fn.csince themain.rsgenerated is detected as a test by @kkysen in #1499 - refactor: Update
reorganize_definitionstest and fix some issues by @ahomescu in #1484 - test.py: only run
*.gen.shscripts actually generated during that run by @kkysen in #1488 - refactor: Implement deep structural comparison of ADTs by comparing all variants individually by @ahomescu in #1475
- transpile: Do not deref when taking address of array indexing expression by @Rua in #1494
- Enable more refactor transforms for python2 by @ahomescu in #1502
- transpile: Use raw borrows instead of normal borrows by @Rua in #1355
- transpile: Do not emit block and
initvariable for non-bitfield structs by @Rua in #1508 - Add crisp tools by @fw-immunant in #1505
- transpile: Avoid some identity transmutes for function pointers by @Rua in #1510
- Add definition splitting to transpiler by @fw-immunant in #1477
- Add c2rust-postprocess tool by @thedataking in #1504
- transpile: Also resolve extension operators in
unwrap_predefined_identby @Rua in #1515 - Support python 3.12 in test suite runner by @randomPoison in #1518
- Fix error code reporting for test suite failures by @randomPoison in #1517
- tests: Print stderr too on unit test failure by @Rua in #1527
- Allow empty include paths by @abakst in #1528
- c2rust-bitfields-derive: pin all dependencies by @kkysen in #1529
- postprocess: add type-checking by @kkysen in #1531
- postprocess: add
--update-rustso we can avoid updating in-place for tests by @kkysen in #1532 - postprocess: run on a whole dir at once, searching for
*.c_decls.jsonfiles by @kkysen in #1533 - postprocess: switch from
gemini-3-pro-previewtogemini-3-flash-previewfor the default by @kkysen in #1535 - transpile: Run
rustfmton generated .rs files by @Rua in #1458 - Fix nix build for c2rust by @Chobbes in #1341
- transpile: Move some stuff into
structmodule by @Rua in #1516 - Add missing
uvdependency to Nix flake by @Rua in #1539 - ci: add basic CI for
tools/by @kkysen in #1538 - reorganize_definitions: Shorten paths that are imported into the current module by @ahomescu in #1399
- Handle C decls with zero ending row/col by @fw-immunant in #1546
- postprocess: add
--exclude-filefor skipping functions by @kkysen in #1541 - tests/integration: print times for each step and flush to see it in CI by @kkysen in #1547
- transpile: simplify and fix comparing
SrcLocs by include paths by @kkysen in #1548 - refactor: unset
$RUSTC_WRAPPERso it doesn't add an extrarustcarg by @kkysen in #1500 - build(deps): bump pyasn1 from 0.6.1 to 0.6.2 in /c2rust-postprocess by @dependabot[bot] in #1549
- build(deps): bump urllib3 from 2.6.2 to 2.6.3 in /c2rust-postprocess by @dependabot[bot] in #1550
- transpile: replace glob import used for linking with a normal import by @ahomescu in #1540
- Fix issue #1509 by improving handling of unused expression side effects by @ahomescu in #1544
- tests/integration: update
json-c's postprocess LLM cache after #1554 by @kkysen in #1551 - transpile: add
--c2rust-dirto resolve relative c2rust dependencies by @kkysen in #1559 - tests/integration: cleanups for postprocess integration by @kkysen in #1568
- refactor: configure
cargoby @kkysen in #1573 - Restore cross checking code, part 1 by @ahomescu in #1575
- refactor: Fix transform casts from non-unit to unit types by @ahomescu in #1567
- build(deps): bump spin from 0.5.0 to 0.5.2 in /cross-checks/zero-malloc by @dependabot[bot] in #1576
- build(deps): bump smallvec from 0.6.4 to 0.6.14 in /cross-checks/zero-malloc by @dependabot[bot] in #1577
- git: set
update = nonefor all submodules so that cargo git dependencies don't clone them by @kkysen in #1574 - Restore cross checks, part 2: fix the Rust runtime and unit tests by @ahomescu in #1578
- build(deps): bump bytes from 1.10.1 to 1.11.1 by @dependabot[bot] in #1585
- Prepare for v0.22.0 release by @kkysen in #1588
New Contributors
- @randomPoison made their first contribution in #1518
- @abakst made their first contribution in #1528
Full Changelog: https://github.com/immunant/c2rust/compare/v0.21.0...v0.22.0