Skip to content

Releases: immunant/c2rust

v0.19.0

01 Sep 20:26
b9339f4
Compare
Choose a tag to compare

What's Changed

Read more

v0.18.0

22 May 20:16
Compare
Choose a tag to compare

In addition to lots of (still very WIP) progress towards our goal of automatic safening of c2rust's unsafe output, this release also includes:

  • a bug fix for compile_commands.json handling (3f4f128)
  • fixes for LLVM 17 and macOS 12 (e1043cd)
  • a crash fix for c2rust-ast-exporter (5b9800a)
  • fixes for unary operations with side effects (f9c5195)
  • compilation fixes for freebsd (abe22f6)
  • improved translation for else-if chains (d467a76)
  • transpilation fixes for many compiler builtins (5b097bb)

v0.17.0

01 Feb 21:52
Compare
Choose a tag to compare

This is our first release in a while, and includes many fixes and small improvements from the community. While most of our efforts on C2Rust are focused on working towards tools for lifting C2Rust's unsafe output into safe Rust (which is not yet polished enough for release), there have still been quite a few changes since the last release.

Significant changes:

  • various CLI improvements (#777, #703, #579)
  • fixes for Apple Silicon macs (#711)
  • basic RISC-V vector type support (#693)
  • LLVM 15 support (#677)
  • improvements to va_copy handling (#612)
  • permit translation of wrapping arithmetic ops in constant contexts (#528)
  • remove c2rust-macros (#527)
  • handle more non-UTF8 system paths (#519)
  • preserving C label names (#415)
  • various inline asm fixes (#405, #404)

v0.16.0 - C2Rust builds with stable Rust

12 May 18:55
Compare
Choose a tag to compare

C2Rust now uses the syn crate for Rust AST construction, which means we no longer depend on rustc compiler internals and can build with a stable Rust toolchain! Huge thanks to @fw-immunant for all the hard work involved in decoupling the transpiler from Rust internals.

In the process, we've added support for transpiling C inline assembly to stable Rust asm! blocks. C2Rust also now supports building against newer LLVM versions (up to version 13). Unfortunately we have not yet re-implemented translation of C comments into Rust using the new AST framework, but expect that to be fixed soon!

As part of moving away from compiler internals, we have deprecated the refactoring engine and cross-checks. Source code for the refactoring engine is still available in tree, but you may encounter issues trying to use it and we're not planning to put any substantial effort in that direction in the near future.

Other changes:

Maintenance Release

14 Feb 18:06
Compare
Choose a tag to compare
Maintenance Release Pre-release
Pre-release

This is just a current snapshot, nothing major to see here. New and exciting things are just around the corner!

Maintenance Update

21 Oct 00:26
Compare
Choose a tag to compare

This release rolls up various maintenance and adds support for a few new
language features. C2Rust now supports LLVM 10.

Other changes:

  • Improved refactoring: reorg now reorganizes (approximately) 100% better, lua script support is now more robust, and refactoring correctly handles #[cfg] annotations in the input Rust code.
  • --preserve-unused-functions added to c2rust transpile. This option preserves all functions, regardless of usage in the program. Only turn this on if you know you need it! Thanks to @chrysn for this new feature.
  • @chrysn added support for AAPCSABIBuiltinVaList. Thanks again!

C Declaration Linking in Rust

19 Dec 00:34
652104a
Compare
Choose a tag to compare

C2Rust now merges header declarations and imports them with proper Rust use statements instead of duplicating header items in every file. To take advantage of this new feature, you will need to transpile with --emit-build-files. See our blog post for a deep dive into how this works.

This release updates C2Rust to use rustc nightly-2019-12-05, so be sure to install with cargo +nightly-2019-12-05 install c2rust.

Other changes:

  • Updating to nightly-2019-12-05 fixes a compiler bug that was sometimes triggered by transpiled code.
  • Added support for AArch64 variadic function definitions.
  • Added experimental refactoring support for rewriting parameters and locals from raw pointers into safe Rust types.
  • Fixed infinite loop in const C macro expansion.
  • Significant improvements to the Lua refactoring API: Reading and writing fields is now supported for all AST nodes through auto-generated Lua bindings.
  • LLVM 9 support

v0.12.0 - Variadics support

23 Aug 00:42
Compare
Choose a tag to compare

This release improves support for translating variadic functions. C2Rust now supports translation of va_start, va_end, and va_copy into equivalent Rust APIs.

v0.11.0

15 Aug 00:15
Compare
Choose a tag to compare

We've made some significant improvements, so it's past time for a new crates.io release. C2Rust now requires nightly 2019-06-22, so install with cargo +nightly-2019-06-22 install c2rust.

Changes:

  • Update to nightly 2019-06-22 (needed for va_copy support)
  • Improved support for flexible array members
  • Better error messages
  • Translate constant expression C macros to Rust const globals
  • Improved support for inline assembly
  • Support GNU __builtin_choose_expr
  • Support K&R style C function pointers (unspecified arguments)
  • Improve module reorganization (consolidating duplicate header items across modules)
  • Speed up refactoring
  • Expanded Lua refactoring script API
  • Update to using c2rust-bitfields 0.2.0
  • Preserve comments during translation
  • Add support for translating multiple binaries in the same project
  • More refactoring capabilities

0.10.0

15 Apr 23:55
Compare
Choose a tag to compare

You can now install C2Rust directly from crates.io: cargo +nightly-2019-04-12 install c2rust.

Variadic argument function definitions are now supported (if va_copy is not used).
Other improvements:

  • Lua refactoring script interface
  • New example project translations: tinycc
  • Improved support for generating Cargo.toml build files
  • Support for translating to no_std Rust
  • Improved header and declaration handling
  • More robust for loop reconstruction refactoring
  • Refactoring support for printf to println! conversion
  • LLVM 8 support
  • Support for translating more C features (and extensions):
    • long double type
    • GCC atomic builtins
    • thread-local variables
    • inline attributes
    • more SIMD intrinsics