silk.build.options.
Standard command-line options shared by build commands.
Import as Options with import silk.build.options { Options }.
Public declarations: 2.
Optimize#
pub enum OptimizeThe optimization applied to a compilation or a defining package.
None#
NonePreserve straightforward code generation for development.
Speed#
SpeedOptimize execution speed.
Size#
SizeOptimize code size.
Implementation Schema for Optimize#
impl Schema for OptimizeOperation kind#
static fn kind() -> KindOf<Self>Operation read#
effect fn read<R: SchemaReader>(reader: &mut R) -> Self
! Issue | OutOfMemoryError
? &mut AllocatorOperation write#
effect fn write<W: SchemaWriter>(self: &Self, writer: &mut W) -> ()
! Issue | WriterError | OutOfMemoryError
? &mut Writer | &mut AllocatorOperation shape#
effect fn shape(shapes: &mut Shapes) -> ShapeOf<Self>
! OutOfMemoryError
? &mut AllocatorImplementation Optimize#
impl OptimizeMethod text#
pub fn text(self: Self) -> string<'static>Returns the spelling used by compilation requests and command-line arguments.
Implementation FromArg for Optimize#
impl FromArg for OptimizeOperation fromArg#
effect fn fromArg(arg: Arg<'_>) -> Result<Self, bool>
! OutOfMemoryError
? &mut AllocatorImplementation ArgValue for Optimize#
impl ArgValue for OptimizeOperation takesValue#
fn takesValue() -> boolOperation repeats#
fn repeats() -> boolOperation initial#
effect fn initial() -> Self
! OutOfMemoryError
? &mut AllocatorOperation accept#
effect fn accept(self: &mut Self, arg: Arg<'_>) -> bool
! OutOfMemoryError
? &mut AllocatorOptions#
pub struct OptionsThe fixed options a command embeds with Command.flatten.
Field target#
pub target: List<String>Requested target triples, in command-line order. An empty list selects the host.
Field optimize#
pub optimize: OptimizeThe requested optimization. --release selects Speed.
Field debug#
pub debug: Option<bool>An explicit debug-information choice; absent uses the compilation's mode default.
Field unsandboxedTools#
pub unsandboxedTools: boolAuthorizes package tools without a sandbox during this command.
Implementation Options#
impl OptionsAssociated function make#
pub fn make() -> SelfReturns host-target development options without an explicit debug override.
Method debugInfo#
pub fn debugInfo(self: &Self) -> boolReturns the debug choice, defaulting to enabled for unoptimized code.
Implementation CommandLine for Options#
impl CommandLine for OptionsOperation command#
static fn command() -> Command<Self>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.