Rsassy installs a C shim plus Rust backend libraries. One backend is selected per R process.
backend = "auto" uses the first installed and supported
backend in this order:
wasm_simd128avx512avx2neonscalarCall sassy_set_backend() before any other Rsassy native
call. Backend loading is one-shot, so test another backend in a new R
process.
script <- tempfile(fileext = ".R")
writeLines(c(
"library(Rsassy)",
"sassy_set_backend('scalar')",
"print(sassy_features())"
), script)
cat(system2(file.path(R.home("bin"), "Rscript"), c("--vanilla", script), stdout = TRUE), sep = "\n")
#> <sassy_features>
#> dispatch: dynamic
#> selected backend: scalar
#> installed backends: scalar, avx2, avx512
#> supported backends: scalar, avx2
#> CPU: avx2=yes avx512f=no neon=no
#> Rust backend: portable_scalar (native_simd=no)
unlink(script)The sassy crate uses build-time SIMD configuration and
SIMD-dependent types. The R package therefore builds separate Rust
libraries for the supported backend families instead of switching
individual functions at runtime.