silk.build.options.

Standard command-line options shared by build commands.

Import as Options with import silk.build.options { Options }.

Public declarations: 2.

Optimize#

silk
pub enum Optimize

The optimization applied to a compilation or a defining package.

None#

silk
None

Preserve straightforward code generation for development.

Speed#

silk
Speed

Optimize execution speed.

Size#

silk
Size

Optimize code size.

Implementation Schema for Optimize#

silk
impl Schema for Optimize

Operation kind#

silk
static fn kind() -> KindOf<Self>

Operation read#

silk
effect fn read<R: SchemaReader>(reader: &mut R) -> Self
    ! Issue | OutOfMemoryError
    ? &mut Allocator

Operation write#

silk
effect fn write<W: SchemaWriter>(self: &Self, writer: &mut W) -> ()
    ! Issue | WriterError | OutOfMemoryError
    ? &mut Writer | &mut Allocator

Operation shape#

silk
effect fn shape(shapes: &mut Shapes) -> ShapeOf<Self>
    ! OutOfMemoryError
    ? &mut Allocator

Implementation Optimize#

silk
impl Optimize

Method text#

silk
pub fn text(self: Self) -> string<'static>

Returns the spelling used by compilation requests and command-line arguments.

Implementation FromArg for Optimize#

silk
impl FromArg for Optimize

Operation fromArg#

silk
effect fn fromArg(arg: Arg<'_>) -> Result<Self, bool>
    ! OutOfMemoryError
    ? &mut Allocator

Implementation ArgValue for Optimize#

silk
impl ArgValue for Optimize

Operation takesValue#

silk
fn takesValue() -> bool

Operation repeats#

silk
fn repeats() -> bool

Operation initial#

silk
effect fn initial() -> Self
    ! OutOfMemoryError
    ? &mut Allocator

Operation accept#

silk
effect fn accept(self: &mut Self, arg: Arg<'_>) -> bool
    ! OutOfMemoryError
    ? &mut Allocator

Options#

silk
pub struct Options

The fixed options a command embeds with Command.flatten.

Field target#

silk
pub target: List<String>

Requested target triples, in command-line order. An empty list selects the host.

Field optimize#

silk
pub optimize: Optimize

The requested optimization. --release selects Speed.

Field debug#

silk
pub debug: Option<bool>

An explicit debug-information choice; absent uses the compilation's mode default.

Field unsandboxedTools#

silk
pub unsandboxedTools: bool

Authorizes package tools without a sandbox during this command.

Implementation Options#

silk
impl Options

Associated function make#

silk
pub fn make() -> Self

Returns host-target development options without an explicit debug override.

Method debugInfo#

silk
pub fn debugInfo(self: &Self) -> bool

Returns the debug choice, defaulting to enabled for unoptimized code.

Implementation CommandLine for Options#

silk
impl CommandLine for Options

Operation command#

silk
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.

View the source of this page