silk.build.write_files.
Generated files whose contents are known values or other steps' deferred values.
Import as WriteFiles with import silk.build.write_files { WriteFiles }.
Public declarations: 2.
WriteFiles#
pub union WriteFilesA generated-file step shared by static package plans and runtime task graphs.
Static#
StaticDynamic#
DynamicImplementation WriteFiles#
impl WriteFilesAssociated function empty#
pub static fn empty() -> SelfBegins a pure description of generated text files.
Method literal#
pub static fn literal(self: Self, name: string<'static>, content: string<'static>) -> SelfAdds a known text file to a static description.
Method description#
pub static fn description(self: &Self) -> Option<&'static Chain<StaticFile>>Reads a pure file description; runtime values cannot enter a package plan.
Method result#
pub static fn result(self: &Self, name: string<'static>) -> Deferred<Path>Names a file without registering or executing its producer.
Associated function make#
pub fn make() -> SelfStarts a generated-file step that accepts runtime values.
Method text#
pub effect fn text(self: Self, name: string, content: string) -> Self ! StepFailure ? &mut AllocatorAdds known UTF-8 text to the generated files.
Method value#
pub effect fn value(self: Self, name: string, content: Deferred<String>) -> Self ! StepFailure ? &mut AllocatorAdds a deferred text value, retaining its producer dependency.
Method register#
pub effect fn register(self: Self) -> StepHandle ! StepFailure ? &mut AllocatorRegisters the files and returns a handle to their deferred output paths.
Method registerHere#
pub effect fn registerHere(self: Self) -> StepHandle ! StepFailure ? &mut AllocatorRegisters the files as work this process runs itself, without describing it to the compiler.
restore#
pub effect fn restore(step: &[u8]) -> StepHandle ! StepFailure ? &mut AllocatorRestores described files as a step this process can run.
Implementation Step for WriteFiles#
impl Step for WriteFilesOperation 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.