Distributable {box} modules with 'carrier'
#395
joshuamarie
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
For the past month I've been building
carrier, a Rust-based package manager that makes{box}modules manageable and distributable across systems. Similar topiporcargo, but for{box}.It's early beta stage but functional, so I wanted to share it here before pushing toward a proper alpha.
What it does
carrierlets you bundle a{box}module into an archive, publish it (or share it via GitHub), and install it on another machine — with CRAN dependencies resolved automatically. Once installed, the module is importable throughbox::use()without any path fiddling.Command-line Interface
Rust projects have their own command line interface (CLI), such as Posit's 'air', so I made one.
How it hooks into
{box}I patched three files in the
{box}source to teach it about carrier packages as a third module kind, alongside local modules and R packages:spec.r: 'carrier' packages are importable without.or..prefixes, and submodule/name imports work exactly as they do for local modules.info.r: 'carrier' packages get their own class, andfind_mod()is extended to locate them in the carrier library.paths.r: addedcrr_mod_search_path(), which resolves where 'carrier' packages are installed.spec.rdepends on this.Demo
Using the
convertmodule (a unit conversion toolkit I bundled as a test case):What's still missing
Note: 'carrier' is still on the early beta stage. It lacks the following:
Why "carrier"?
I originally built this to distribute my own deep learning modules between machines. The name stuck.
Follow-up Question
Is it time now for
{box}modules to become distributable?Beta Was this translation helpful? Give feedback.
All reactions