Skip to content
Prev 62964 / 63424 Next

Proposal: Integrating Rust Toolchain into Rtools for Rust-Based R Package Development

Hi Tomas,

Thank you very much for the detailed and thoughtful reply. Your explanation really helped me better understand the architecture of Rtools.

You're absolutely right that a **ideal** integration of Rust into Rtools would ideally involve extending the MXE-based toolchain, as the same compiling environment can guarantee the ABI compatibility. 

However, that is not the only way to ensure ABI compatibility. By leveraging shared UCRT-based ABI compatibility and using Rtools' own linker during the build process, integrating the Rust compiler binaries (x86_64-pc-windows-gnu toolchain) into the Rtools environment has proven effective and stable in practice.

I documented the process, rationale, and some findings in a blog post here: https://medium.com/@sunwjie/integrating-the-rust-toolchain-into-rtools-e4c7df40cb82

What I?ve done so far is very much user-oriented. The goal isn't to replace a proper MXE-based integration, but rather to offer an usable solution for R package users with {extendr} or {savvy}, while also exploring longer-term collaboration toward better support.

I'd be very happy to contribute to or test any future concerns you had according to this integration methods, as well as explore the potential MXE-based integration in the future.

Thanks,
Wenjie

P.S. During the process, I received valuable assistance from the Extendr community, particularly from @Mossa @albersonmiranda, @josiah and @luciorq, for which I am especially grateful.

----
https://www.sun-wenjie.site