extendr / rextendr

An R package that helps scaffolding extendr-enabled packages or compiling Rust code dynamically
https://extendr.github.io/rextendr/
Other
175 stars 25 forks source link

Add `rust_sitrep()` function #274

Closed Ilia-Kosenkov closed 1 year ago

Ilia-Kosenkov commented 1 year ago

Closes #168

Add rust_sitrep() function to report on the state of rust infrastructure to the best of our ability. Rely on cargo and rustup to determine versions of the build system, host architecture, available targets, and default toolchain. If anything is missing, suggest using rustup. rust_sitrep() does not make an attempt to gues if the appropriate target is installed.

rextendr::rust_sitrep()
#> Rust infrastructure sitrep:
#> ✔ "rustup": 1.25.1 (bb60b1e89 2022-07-12)
#> ✔ "cargo": 1.68.2 (6feb7c9cf 2023-03-26)
#> ℹ host: x86_64-pc-windows-msvc
#> ℹ toolchain: stable-x86_64-pc-windows-msvc
#> ℹ targets: i686-pc-windows-gnu, x86_64-pc-windows-gnu, and
#>   x86_64-pc-windows-msvc

Created on 2023-05-13 with reprex v2.0.2

Here we pretend nothing is installed

rextendr::rust_sitrep()
#> Rust infrastructure sitrep:
#> ✖ "rustup": not found
#> ✖ "cargo": not found
#> ✖ Cannot determine host, toolchain, and targets without "rustup"
#> ✖ "cargo" is required to build rextendr-powered packages
#> ℹ It is recommended to use "rustup" to manage "cargo" and "rustc"
#> ℹ See <https://rustup.rs/> for installation instructions

Created on 2023-05-13 with reprex v2.0.2

CGMossa commented 1 year ago

Omg so far this thing looks clean.. 👍