You need R (>= 4.2), Rust (cargo + rustc >= 1.88) and the usual R dev
packages (devtools, rextendr, testthat, pkgdown).
devtools::document() # regenerates Rd + NAMESPACE (and Rust wrappers on build)
devtools::test()
devtools::check()The Rust sources live in src/rust/. After changing exported #[extendr]
functions, rebuild so R/extendr-wrappers.R is regenerated (it is written by
cargo run --bin document during the build).
Run cargo fmt and cargo clippy --lib inside src/rust/ before pushing;
CI enforces both.
tools/update-vendor.sh <new-version>The script bumps the dependency in src/rust/Cargo.toml, refreshes
Cargo.lock, re-vendors all crates into src/rust/vendor.tar.xz (the
archive used for offline builds), and regenerates inst/COPYRIGHTS. Then:
- update
Config/polyglotSQL/upstreaminDESCRIPTION; - run the test suite (
devtools::test()), which asserts the linked crate version matchesDESCRIPTION; - mention the upgrade in
NEWS.md.
The pkgdown workflow builds the site on every push to main (or manually
via Actions → pkgdown → Run workflow) and pushes the rendered site to the
gh-pages branch using only the repository GITHUB_TOKEN.
To enable it once per repository: Settings → Pages → Build and deployment →
Source: "Deploy from a branch" → Branch: gh-pages / / (root). The first
workflow run creates the branch automatically.
Local preview: pkgdown::build_site() then open docs/index.html.