silk.build.definition.
Typed compilation definitions whose defaults and package inputs the toolchain resolves.
Import as Definition with import silk.build.definition { Definition }.
Public declarations: 5.
Definition#
pub struct DefinitionA package-backed compilation before target defaults, imports, and plans are resolved.
Field manifest#
pub manifest: StringThe absolute manifest path defining the available packages.
Field name#
pub name: Option<String>The artifact name; absent uses the package name.
Field artifact#
pub artifact: Option<String>The artifact shape; absent uses the package's default.
Field stdlib#
pub stdlib: Option<String>The standard-library root; absent uses the compiler installation.
Field settings#
pub settings: SettingsValues selected by the command after its deferred inputs complete.
Field packages#
pub packages: Dictionary<Package>Overrides keyed by declared dependency alias, or self for the root package.
Implementation Schema for Definition#
impl Schema for DefinitionOperation spec#
static fn spec() -> Spec<Definition>Settings#
pub struct SettingsCompilation settings without target-dependent defaults. Lists preserve the command's order.
Field profile#
pub profile: ProfileOptional program-wide source and backend settings.
Field root#
pub root: Option<String>An absolute root module path; absent uses the package entry.
Field modules#
pub modules: List<Module>Generated modules added to the root package.
Field native#
pub native: NativeAdditional native translation units and link inputs.
Field emit#
pub emit: Option<String>The emitted form; absent selects the final artifact.
Field platform#
pub platform: Option<Platform>An explicit sysroot, linker, and support installations.
Field windows#
pub windows: Option<Windows>Windows link settings.
Field macos#
pub macos: Option<MacOS>macOS link and signing settings.
Field wasm#
pub wasm: Option<Wasm>WebAssembly memory, execution, and interface settings.
Field header#
pub header: Option<String>The requested C header output path.
Field importLibrary#
pub importLibrary: Option<String>The requested import library output path.
Field runner#
pub runner: Option<Runner>The program and arguments used to launch the artifact.
Implementation Schema for Settings#
impl Schema for SettingsOperation spec#
static fn spec() -> Spec<Settings>Implementation Settings#
impl SettingsAssociated function make#
pub fn make() -> SelfReturns settings that leave target-dependent defaults to the compiler.
Package#
pub struct PackageOverrides for one declared package, without changing program-wide source facts.
Field optimization#
pub optimization: Option<String>The defining package's code-generation optimization.
Field debug#
pub debug: Option<bool>Whether code defined in this package emits debug information.
Field parameters#
pub parameters: List<Parameter>Parameters named by module and declaration.
Field excluded#
pub excluded: boolWhether this compilation excludes the declared dependency.
Implementation Schema for Package#
impl Schema for PackageOperation spec#
static fn spec() -> Spec<Package>Operation check#
fn check(self: &Self, checks: &mut Checks<Self>) -> ()Parameter#
pub struct ParameterA typed parameter binding supplied by a root command.
Field module#
pub module: StringThe package-relative module path declaring the parameter.
Field name#
pub name: StringThe parameter declaration's name.
Field value#
pub value: ParameterValueThe supplied value, interpreted against the declared parameter schema.
Field suppliedPath#
pub suppliedPath: boolWhether this value grants a supplied-path capability to the package's plan.
Implementation Schema for Parameter#
impl Schema for ParameterOperation spec#
static fn spec() -> Spec<Parameter>Operation check#
fn check(self: &Self, checks: &mut Checks<Self>) -> ()Profile#
pub struct ProfileOptional source facts and backend settings, resolved by the compiler's target policy.
Field target#
pub target: Option<String>The canonical target triple.
Field cpu#
pub cpu: Option<String>The CPU model.
Field cpuFeatures#
pub cpuFeatures: Option<List<String>>The enabled CPU features.
Field deployment#
pub deployment: Option<String>The minimum operating-system version.
Field libc#
pub libc: Option<String>The selected C library.
Field entry#
pub entry: Option<String>The entry selection: default, none, or a declared name.
Field runtime#
pub runtime: Option<String>The runtime selection: default, none, or a declared name.
Field link#
pub link: Option<String>The link mode.
Field codeModel#
pub codeModel: Option<String>The target code model.
Field relocation#
pub relocation: Option<String>The relocation model.
Field optimization#
pub optimization: Option<String>The program-wide optimization: none, speed, or size.
Field debug#
pub debug: Option<bool>Whether the program emits debug information by default.
Field safety#
pub safety: Option<String>The program-wide safety policy.
Field threading#
pub threading: Option<String>The program-wide threading policy.
Field sanitizers#
pub sanitizers: Option<List<String>>The enabled sanitizers.
Field unwind#
pub unwind: Option<String>The unwind policy.
Field backend#
pub backend: Option<String>The code generator: llvm or direct.
Field codegenUnits#
pub codegenUnits: Option<u64>The number of code generation units for an optimized build.
Field maxMemory#
pub maxMemory: Option<u64>The maximum WebAssembly memory, in bytes.
Field stackSize#
pub stackSize: Option<u64>The main stack size, in bytes.
Implementation Schema for Profile#
impl Schema for ProfileOperation spec#
static fn spec() -> Spec<Profile>Implementation Profile#
impl ProfileAssociated function make#
pub fn make() -> SelfLeaves every setting unspecified so the target supplies its defaults.
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.