Call
The call keyword is used to include a reusable set of tasks in a run. There are three different types of things you can
use with call:
- Published packages: publicly published definitions of tasks providing common functionality such as installing a programming language or a particular CLI
- Local packages: reusable sets of tasks defined in your project's
.rwx/packagesdirectory - Embedded runs: independent run definitions that can be embedded inside other run definitions
When to use a local package vs an embedded run
The following table illustrates the difference between local packages and embedded runs:
| Local packages | Embedded runs | |
|---|---|---|
| Base and architecture | Inherit the base layers of the calling run | Declare their own base and their own architecture |
| Independent execution | Only run as part of a calling run | Can be run independently, outside of being embedded in another run |
| Task dependencies | Can depend on other tasks and be depended on by other tasks with use or after | Cannot depend on or be depended on by other tasks with use, but does support after |
| Common use cases | Sharing setup across a CI run and a sandbox run; running a parallel group with multiple tasks inside it | Sequencing a deploy run after a ci run; building binaries with multiple architectures |