Skip to contents

Compile the pinned IAN and Clarabel sources installed with dgraphs in a new directory. The supported build target is macOS arm64. Setup requires Python 3, Apple's C++ compiler/SDK, and matching native Cargo/Rust tools (Rust >= 1.77). An initial build needs cached crates or network access. No tools are installed by this function. Compilation is explicit and never starts inside create.ian.graph() or ordinary package installation.

Usage

build.ian.backend(
  build.dir,
  python = "python3",
  cargo = "cargo",
  rustc = "rustc",
  cxx = "clang++",
  offline = FALSE
)

Arguments

build.dir

New output directory, including logs and source copies. Existing files/directories are refused. A path containing spaces is allowed.

python

Python 3 command or executable path.

cargo

Cargo command or executable path from a native arm64 toolchain.

rustc

Rust compiler command or path from the same toolchain as cargo.

cxx

C++ compiler command or executable path.

offline

Logical scalar. If TRUE, Cargo uses only cached dependencies.

Value

The absolute path to dgraphs_ian.so, invisibly. Save this path and pass it to create.ian.graph(..., backend = path). Reuse the built module with the same R installation; rebuild when changing R runtime or backend sources. Build errors retain available logs and raise an R error. No shared package library is modified. Build records identify source files and tool commands.

Examples

if (FALSE) { # \dontrun{
backend <- build.ian.backend("ian-build")
fit <- create.ian.graph(matrix(c(0, 1, 2), ncol = 1), backend = backend)
stopifnot(fit$complete)
} # }