Package: tarpolyglot 0.3.0

Pierre Solomon

tarpolyglot: Run 'Python', 'Julia', 'Rust', and 'C++' Inside 'targets' Pipeline Steps

Adds target constructors that make it easy to use 'Python', 'Julia', 'Rust', and 'C++' inside a 'targets' pipeline using 'reticulate', 'JuliaCall', 'rextendr', and 'Rcpp'. Provides tar_target_py(), tar_target_jl(), tar_target_rs(), and tar_target_cpp() (with matching _raw() variants), each mirroring 'targets' tar_target() and tar_target_raw() functions. 'Python' and 'Julia' steps run a script via a live interpreter with optional R pre- and post-scripts; 'Rust' and 'C++' steps compile functions and call them from an R post-script. Results are then returned either as converted R objects or as files written to disk (format = "file"). Dynamic branching, environment/version selection, a 'crew' controller for isolation, and the full set of tar_target_raw() arguments are supported.

Authors:Pierre Solomon [aut, cre]

tarpolyglot_0.3.0.tar.gz
tarpolyglot_0.3.0.zip(r-4.7-any)tarpolyglot_0.3.0.zip(r-4.6-any)tarpolyglot_0.3.0.zip(r-4.5-any)
tarpolyglot_0.3.0.tgz(r-4.6-any)tarpolyglot_0.3.0.tgz(r-4.5-any)
tarpolyglot_0.3.0.tar.gz(r-4.7-any)tarpolyglot_0.3.0.tar.gz(r-4.6-any)
tarpolyglot_0.3.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
tarpolyglot/json (API)

# Install 'tarpolyglot' in R:
install.packages('tarpolyglot', repos = c('https://pierre9344.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/pierre9344/tarpolyglot/issues

Pkgdown/docs site:https://pierre9344.github.io

On CRAN:

Conda:

6.22 score 11 stars 301 downloads 27 exports 57 dependencies

Last updated from:50131042a9. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK178
source / vignettesOK201
linux-releaseOK153
macos-releaseOK191
macos-oldrelOK199
windows-develOK88
windows-releaseOK96
windows-oldrelOK94
wasm-releaseOK152

Exports:compile_cpp_libcompile_rs_libpolyglot_controllerrun_cpp_steprun_cpp_step_prebuiltrun_jl_steprun_py_steprun_rs_steprun_rs_step_prebuilttar_codetar_polyglot_logtar_target_cpptar_target_cpp_rawtar_target_jltar_target_jl_rawtar_target_pathtar_target_pytar_target_py_rawtar_target_rstar_target_rs_rawtarpolyglot_crosstarpolyglot_headtarpolyglot_maptarpolyglot_sampletarpolyglot_slicetarpolyglot_tailtoolchain_check

Dependencies:backportsbase64urlbriocallrclicodetoolscollectionscpp11crewdata.tabledescdplyrevaluatefastmapgenericsglueherehighrigraphjsonliteJuliaCallknitrlaterlatticelifecyclemagrittrMatrixmirainanonextotelpillarpkgbuildpkgconfigpngprettyunitsprocessxpromisespsR6rappdirsRcppRcppTOMLreticulaterextendrrjsonrlangrprojrootsecretbasestringitargetstibbletidyselectutf8vctrswithrxfunyaml

Using C++ inside targets
Do you need tar_target_cpp()? | The two constructors | How a C++ step differs from the Python/Julia steps | Arguments | Installing Rcpp and checking | Object output (iris example) | File output | Extension packages | Parallel computing with RcppParallel | Bringing an R function into C++ | The function is not part of the compiled library | Where the R function can be defined | Dynamic branching | Compile the C++ code only once across branches | They fall back to the plain pattern on Python and Julia | Several C++ steps in one pipeline | Compile once, reuse in other steps | Reusing a tar_target_cpp() companion library elsewhere | Using more than one library in a step | Current limitations | Step output and tar_polyglot_log() | Rtools note (Windows) | Trade-offs vs Python/Julia

Last update: 2026-08-29
Started: 2026-08-26

Using Julia inside targets
The two constructors | Arguments | Scripts, data, and output | Choosing the Julia install / project | The three-script model | Object output | File output | Dynamic branching (iris example) | Parallel computing (Distributed, not Threads) | Choosing the Julia install and project | Use case 1: Julia on PATH (default) | Use case 2: a specific juliaup version | Use case 3: an explicit Julia home | Use case 4: a pinned project (recommended) | Tracking scripts as dependencies | Conversion caveats

Last update: 2026-08-27
Started: 2026-07-30

Using Python inside targets
The two constructors | Arguments | Scripts | Wiring in data and reading it back | Choosing the interpreter / environment | The three-script model | Object output | File output | Dynamic branching | Parallel computing (multiprocessing) | Choosing the Python environment | Use case 1: global / system default | Use case 2: a pinned uv virtualenv (recommended) | Use case 3: a poetry project | Use case 4: a plain venv or a conda env | Use case 5: pin just the version | Tracking scripts as dependencies | Conversion caveats

Last update: 2026-08-27
Started: 2026-07-30

Using Rust inside targets
Do you need tar_target_rs()? | The two constructors | How a Rust step differs | Arguments | Installing Rust and rextendr | Object output (iris example) | File output | Crate dependencies, features, profile | Dynamic branching | Compile the Rust code only once across branches | They fall back to the plain pattern on Python and Julia | Several Rust steps in one pipeline | Compile once, reuse in other steps | Using more than one library in a step | Current limitations | Windows toolchain note | Trade-offs vs Python/Julia

Last update: 2026-08-27
Started: 2026-07-30

Get started with tarpolyglot
Motivation | Installation | Limitations to know first | A worked pipeline (Python + iris) | The three-script model | Object output: return a value into the pipeline | File output: return paths to files on disk | Tracking the scripts as dependencies | Parallelism and isolation with crew | Pre- and post-scripts: moving variables in and out | Sending variables in (the pre-script) | Reading variables out (the post-script) | Where to next

Last update: 2026-08-26
Started: 2026-07-30

Supplying scripts to tarpolyglot constructors
The three forms at a glance | 1. A literal path string | 2. A tar_target_path() reference | 3. Inline code with tar_code() | Mixing forms in one call | Which should I use? | Tracking helper files your script imports | Wiring the helper in with inputs | Julia | Why C++ and Rust are different | A note on building code with glue() | See also

Last update: 2026-08-26
Started: 2026-08-26