Skip to content
Discussion options

You must be logged in to vote

I do not see an exported devtools::test() hook in rextendr that automatically runs cargo test.

The package does have an internal run_cargo() helper, but it is marked internal and is not an exported user API. Separately, rextendr::document() is now deprecated because packages created with use_extendr() integrate wrapper generation into the normal build/document flow; that does not make Rust tests part of devtools::test().

The most reliable one-liner from R is to invoke Cargo yourself:

processx::run("cargo", "test", wd = "src/rust", echo = TRUE)
devtools::test()

or wrap both in a small project-local helper:

test_all <- function() {
  processx::run("cargo", "test", wd = "src/rust", echo = TRUE…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@JosephBARBIERDARNAL
Comment options

@JosiahParry
Comment options

@JosephBARBIERDARNAL
Comment options

Answer selected by JosephBARBIERDARNAL
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants