Skip to content
Back to skills

Extendr Bindings

ASecurity

extendr conventions for exposing a Rust core to R: extendr macros and module registration, Robj type mapping, NA handling, rextendr builds, R package scaffolding, and CRAN compliance. Load when generating or reviewing extendr R bindings for a Rust library.

  • 146 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 5, 2026
ai-agentsrustgoapi

Works with

  • api

Security analysis

A100/100

Scanned October 5, 2026

npx -y skills add Goldziher/ai-rulez --skill extendr-bindings --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Extendr Bindings?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Extendr Bindings
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/goldziher-extendr-bindings/badge)](https://www.skillsdirectory.com/skills/goldziher-extendr-bindings)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: extendr-bindings
description: "extendr conventions for exposing a Rust core to R: extendr macros and module registration, Robj type mapping, NA handling, rextendr builds, R package scaffolding, and CRAN compliance. Load when generating or reviewing extendr R bindings for a Rust library."
---

- Use `extendr` crate for Rust-R interop. `#[extendr]` macro on functions, `extendr_module!` for registration.
- Type mapping: `Robj` for generic R objects, `Doubles`, `Integers`, `Strings`, `List` for typed access.
- Return `Result<T, extendr_api::Error>` for R error propagation. Use `.into()` for Rust-to-R conversion.
- NA handling: use `Rfloat::na()`, `Rint::na()` for missing values. Check with `.is_na()` before operations.
- Build with `rextendr::document()` in R for development, `cargo build --release` for production.
- Package integration: use `usethis::use_extendr()` for scaffolding. Maintain `src/rust/` in R package.
- Test R-side with `testthat`, Rust-side with standard `#[test]`. Use `rextendr::test()` for integration.
- CRAN compliance: `R CMD check --as-cran` must pass. No compiler warnings. Vendor Rust dependencies.
- Keep R wrapper functions thin — heavy computation in Rust, R provides user-facing API with roxygen2 docs.
- Anti-patterns: ignoring NA values, allocating R objects in Rust threads, panics in `#[extendr]` functions.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.