silk.build.package.

Per-package backend settings and typed parameter bindings in a compilation graph.

Import as Package with import silk.build.package { Package }.

Public declarations: 4.

Package#

silk
pub struct Package

Overrides that affect only the selected declared package.

Field optimization#

silk
pub optimization: Option<Deferred<Optimize>>

Field debugging#

silk
pub debugging: Option<Deferred<bool>>

Field bindings#

silk
pub bindings: List<Binding>

Field excluded#

silk
pub excluded: bool

Implementation Schema for Package#

silk
impl Schema for Package

Implementation Package#

silk
impl Package

Associated function make#

silk
pub fn make() -> Self

Creates an override that preserves the compilation's defaults.

Method optimize#

silk
pub fn optimize(self: Self, value: Deferred<Optimize>) -> Self

Selects optimization for code defined in this package, including generic instantiations.

Method debug#

silk
pub fn debug(self: Self, value: Deferred<bool>) -> Self

Selects debug information for code defined in this package.

Method set#

silk
pub effect fn set<T: Schema + ParameterInput + Transferable + 'static>(
    self: Self,
    module: string,
    name: string,
    value: Deferred<T>,
  ) -> Self
    ! StepFailure
    ? &mut Allocator

Binds a typed value to a public parameter declared in module, such as build.silk.

Method supplyPath#

silk
pub effect fn supplyPath(self: Self, module: string, name: string, value: Deferred<Path>) -> Self
    ! StepFailure
    ? &mut Allocator

Grants the package's plan read access to a declared path parameter.

Associated function path#

silk
pub effect fn path(name: string, subpath: string) -> Deferred<Path>
    ! StepFailure
    ? &mut Allocator | &mut HostInput | &mut FileSystem

Names a file or directory listed in a declared dependency's package.include. Only a consumer's use resolves and fetches the dependency. No package code is evaluated. The consumer keys the referenced file or tree, including changes to a local dependency.

Method without#

silk
pub fn without(self: Self) -> Self

Excludes this dependency from the compilation's available import graph.

key#

silk
pub effect fn key(package: &Package, key: &mut Key) -> ()
  ! StepFailure
  ? &mut Allocator

Declares the deferred values and supplied paths that determine the override.

resolve#

silk
pub effect fn resolve(package: &Package, make: &mut Make) -> Definitions.Package
  ! StepFailure
  ? &mut Allocator

Resolves overrides only after every declared producer has completed.

restorePath#

silk
pub effect fn restorePath(step: &[u8]) -> StepHandle
  ! StepFailure
  ? &mut Allocator | &mut FileSystem

Restores a described dependency path lookup as a step this process can run.

Profiles: 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.

View the source of this page