Skip to content

C Declaration Linking in Rust

Compare
Choose a tag to compare
@rinon rinon released this 19 Dec 00:34
· 3111 commits to master since this release
652104a

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