check_mdrb: Check Rust Backend Requirements

View source: R/mdrb.R

check_mdrbR Documentation

Check Rust Backend Requirements

Description

check_mdrb() returns a boolean indicating whether a suitable version of the metabodecon Rust backend mdrb is currently installed.

check_mdrb_deps() returns a list with information about the installation status of mdrb system dependencies.

Usage

check_mdrb(stop_on_fail = FALSE)

check_mdrb_deps(verbose = FALSE)

Arguments

stop_on_fail

If TRUE, an error is thrown if the check fails, providing instructions on how to install or upgrade mdrb.

verbose

If TRUE, additional information is printed during the check process.

Value

check_mdrb() returns TRUE if a suitable version of mdrb is installed, else FALSE.

check_mdrb_deps() returns a data.frame as follows:

            check           passed  comment
    r       R >= 4.2        TRUE    Current: R 4.4.2
    rtools  Rtools exist    TRUE    Tested with: pkgbuild::has_build_tools()
    cargo   cargo >= 1.80   TRUE    Current: cargo 1.84.1 (66221abde 2024-11-19)
    rustc   rustc >= 1.80   TRUE    Current: rustc 1.84.1 (e71f9a9a9 2025-01-27)

Column check is a string describing the performed check.
Column passed is a boolean indicating whether the check passed.
Column comment is a string string describing the check result.

The rownames of the dataframe one-word descriptions of the performed checks.

Author(s)

2024-2025 Tobias Schmidt: initial version.

Examples

check_mdrb()


# Checking dependencies might take more than 5 seconds, as it
# requires the compilation of a small test program as well as
# running `cargo --version` and `rustc --version`, which,
# depending on your system, might involve updating or installing
# Rust toolchain components.
check_mdrb_deps(verbose = TRUE)


metabodecon documentation built on Nov. 5, 2025, 7:12 p.m.