silk.build.run.
Process steps with declared arguments, files, environment, and captured values.
Import as Run with import silk.build.run { Run }.
Public declarations: 2.
Run#
pub union RunA process step, described statically or constructed from runtime deferred values.
Static#
StaticDynamic#
DynamicImplementation Run#
impl RunAssociated function fromDescription#
pub fn fromDescription(description: Invocation) -> SelfWraps a standard invocation description for registration in a runtime graph.
Associated function command#
pub static fn command(path: string<'static>) -> SelfDescribes a package-relative executable without reading the filesystem or running it.
Associated function executable#
pub static fn executable(path: Deferred<Path>) -> SelfDescribes an executable supplied by another standard step or a path parameter.
Method arg#
pub static fn arg(self: Self, value: string<'static>) -> SelfAppends a literal argument to a static invocation.
Method input#
pub static fn input(self: Self, value: Deferred<Path>) -> SelfAppends a deferred input path to a static invocation's arguments.
Method output#
pub static fn output(self: Self, name: string<'static>) -> SelfAppends a required output path to a static invocation's arguments.
Method reads#
pub static fn reads(self: Self, value: Deferred<Path>) -> SelfDeclares a static invocation's file dependency without adding an argument.
Method readsTree#
pub static fn readsTree(self: Self, value: Deferred<Path>) -> SelfDeclares a static invocation's directory dependency without adding an argument.
Method description#
pub static fn description(self: &Self) -> InvocationReturns this invocation's immutable description; runtime inputs cannot enter a static plan.
Method result#
pub static fn result(self: &Self, name: string<'static>) -> Deferred<Path>Names a declared output without registering or executing the producing process.
Method when#
pub effect fn when<'env, E, ?R>(self: Self, condition: bool,
transform: once effect fn<'env>(Self) -> Self ! E ? R) -> Self ! E ? RApplies a graph transformation only when the condition is true.
Associated function program#
pub effect fn program(name: string) -> Self ! StepFailure ? &mut Allocator | &mut FileSystem | &mut HostInputResolves an installed program now, including the executable's contents in the step key.
Associated function artifact#
pub fn artifact(program: Deferred<Path>) -> SelfRuns a deferred executable, depending on its producer.
Method register#
pub effect fn register(self: Self) -> StepHandle ! StepFailure ? &mut AllocatorRegisters the invocation and returns a handle to its declared outputs.
Method registerHere#
pub effect fn registerHere(self: Self) -> StepHandle ! StepFailure ? &mut AllocatorRegisters the invocation as work this process runs itself, without describing it to the compiler.
Method confined#
pub effect fn confined(self: Self) -> Self ! StepFailure ? &mut Allocator | &mut FileSystem | &mut HostInputConfines the process to declared inputs, its output directory, and no network.
Method confinedBy#
pub effect fn confinedBy(self: Self, launcher: Deferred<Path>) -> Self ! StepFailure ? &mut AllocatorUses an explicitly selected sandbox launcher and includes its contents in the step key.
Method argument#
pub effect fn argument(self: Self, value: Deferred<String>) -> Self ! StepFailure ? &mut AllocatorAppends a deferred text argument.
Method inputFile#
pub effect fn inputFile(self: Self, path: Deferred<Path>) -> Self ! StepFailure ? &mut AllocatorAppends and keys a deferred file argument.
Method outputFile#
pub effect fn outputFile(self: Self, name: string) -> Self ! StepFailure ? &mut AllocatorAppends and requires a file below the output directory.
Method keyFile#
pub effect fn keyFile(self: Self, path: Deferred<Path>) -> Self ! StepFailure ? &mut AllocatorKeys an additional file without adding an argument.
Method keyTree#
pub effect fn keyTree(self: Self, path: Deferred<Path>) -> Self ! StepFailure ? &mut AllocatorKeys an additional directory without adding an argument.
Method keyEnvironment#
pub effect fn keyEnvironment(self: Self, name: string) -> Self ! StepFailure ? &mut AllocatorKeys and forwards one named environment variable.
Method always#
pub effect fn always(self: Self) -> Self ! StepFailure ? &mut AllocatorMakes the process and its consumers run on every invocation.
Method captureText#
pub effect fn captureText(self: Self) -> Deferred<String> ! StepFailure ? &mut AllocatorCaptures UTF-8 standard output as a deferred value.
Method captureLines#
pub effect fn captureLines(self: Self) -> Deferred<List<String>> ! StepFailure ? &mut AllocatorCaptures UTF-8 standard output split into lines.
restore#
pub effect fn restore(step: &[u8]) -> StepHandle ! StepFailure ? &mut AllocatorRestores a described process as a step this process can run.
Implementation Step for Run#
impl Step for RunOperation prepare#
effect fn prepare(self: Self) -> Self ! StepFailure ? &mut AllocatorOperation key#
effect fn key(self: &Self, key: &mut Key) -> () ! StepFailure ? &mut AllocatorOperation make#
effect fn make(self: &Self, make: &mut Make) -> () ! StepFailure ? &mut AllocatorProfiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2, x86_64-pc-windows-msvc, wasm64-unknown-unknown.