silk.build.manifest.

Package identities, fetch pins, and publication settings read from silk.toml.

Import as Manifest with import silk.build.manifest { Manifest }.

Public declarations: 21.

Manifest#

silk
pub struct Manifest

Static package and workspace data. Compilation settings belong to the build graph.

Field package#

silk
pub package: Option<Package>

The package at this directory, when it is not a virtual workspace.

Field dependencies#

silk
pub dependencies: Dictionary<Dependency>

Packages this package may import, keyed by their import aliases.

Field workspace#

silk
pub workspace: Option<Workspace>

Workspace membership and shared dependency pins.

Field native#

silk
pub native: Option<Native>

Downloaded native archives and local replacements.

Field component#

silk
pub component: Option<Component>

The package's WebAssembly component interface and world.

Field unstable#

silk
pub unstable: Option<Unstable>

Runtime composition declarations that travel with the package.

Field pack#

silk
pub pack: Option<Pack>

Source and binary archive publication settings.

Field release#

silk
pub release: Option<Release>

Release publication settings.

Field postInit#

silk
pub postInit: Option<List<PostInit>>

Commands run only when a developer initializes a project from this template.

Field tool#

silk
pub tool: Option<Tool>

Input-only configuration owned by external tools; manifest edits preserve its original TOML.

Implementation Schema for Manifest#

silk
impl Schema for Manifest

Operation spec#

silk
static fn spec() -> Spec<Manifest>

Operation check#

silk
fn check(self: &Self, checks: &mut Checks<Self>) -> ()

Tool#

silk
pub struct Tool

An external tool's table, accepted without interpreting its keys or values. Decoding discards its contents; a manifest editor must preserve the source document.

Implementation Schema for Tool#

silk
impl Schema for Tool

Component#

silk
pub struct Component

The interface definition and exported world of a WebAssembly component package.

Field wit#

silk
pub wit: String

A WIT file or directory relative to this package.

Field world#

silk
pub world: String

The WIT world to compile.

Implementation Schema for Component#

silk
impl Schema for Component

Operation spec#

silk
static fn spec() -> Spec<Component>

Unstable#

silk
pub struct Unstable

Experimental package declarations whose selected bindings become explicit request inputs.

Field composition#

silk
pub composition: Option<Composition>

Runtime implementations, defaults, and execution-storage bindings.

Implementation Schema for Unstable#

silk
impl Schema for Unstable

Operation spec#

silk
static fn spec() -> Spec<Unstable>

Composition#

silk
pub struct Composition

Runtime and provider declarations available to compilations of this package.

Field runtimes#

silk
pub runtimes: Option<List<Runtime>>

Named runtime modules declared by the package.

Field defaults#

silk
pub defaults: Option<List<String>>

The runtime names selected by default.

Field components#

silk
pub components: Option<List<Capability>>

Execution-storage implementations.

Field retention#

silk
pub retention: Option<List<Retention>>

Declarations retained regardless of import reachability.

Field requirements#

silk
pub requirements: Option<List<String>>

Reserved requirements; the current compiler accepts only an empty list.

Implementation Schema for Composition#

silk
impl Schema for Composition

Operation spec#

silk
static fn spec() -> Spec<Composition>

Operation check#

silk
fn check(self: &Self, checks: &mut Checks<Self>) -> ()

Runtime#

silk
pub struct Runtime

A named package runtime module.

Field name#

silk
pub name: String

The name a compilation selects.

Field module#

silk
pub module: String

The module implementing the runtime.

Implementation Schema for Runtime#

silk
impl Schema for Runtime

Operation spec#

silk
static fn spec() -> Spec<Runtime>

Capability#

silk
pub struct Capability

A runtime capability supplied by a complete set of declaration bindings.

Field capability#

silk
pub capability: String

The supported capability, execution-storage.

Field bindings#

silk
pub bindings: List<StorageBinding>

One binding for each execution-storage operation.

Implementation Schema for Capability#

silk
impl Schema for Capability

Operation spec#

silk
static fn spec() -> Spec<Capability>

Operation check#

silk
fn check(self: &Self, checks: &mut Checks<Self>) -> ()

StorageBinding#

silk
pub struct StorageBinding

One operation supplied by an execution-storage implementation.

Field operation#

silk
pub operation: String

The operation: create, acquire, release, or destroy.

Field module#

silk
pub module: String

The module declaring the implementation.

Field declaration#

silk
pub declaration: String

The implementation's declaration name.

Implementation Schema for StorageBinding#

silk
impl Schema for StorageBinding

Operation spec#

silk
static fn spec() -> Spec<StorageBinding>

Retention#

silk
pub struct Retention

A declaration kept even when no ordinary source import reaches it.

Field module#

silk
pub module: String

The module declaring the retained value or function.

Field declaration#

silk
pub declaration: String

The declaration name.

Implementation Schema for Retention#

silk
impl Schema for Retention

Operation spec#

silk
static fn spec() -> Spec<Retention>

Package#

silk
pub struct Package

A package identity and its source and publication layout.

Field name#

silk
pub name: String

The lowercase package name, distinct from its local import aliases.

Field version#

silk
pub version: String

The full semantic version; absent versions are 0.0.0.

Field silkVersion#

silk
pub silkVersion: Option<String>

The compiler version selected by the launcher.

Field source#

silk
pub source: String

The module root, resolved relative to the package directory.

Field main#

silk
pub main: Option<String>

The root module relative to source; absent roots use main.silk or lib.silk.

Field kind#

silk
pub kind: String

Whether the default command builds an executable or checks a library.

Field exports#

silk
pub exports: Option<List<String>>

Canonical module names that other packages may import.

Field description#

silk
pub description: Option<String>

The package description.

Field license#

silk
pub license: Option<String>

The license identifier.

Field repository#

silk
pub repository: Option<String>

The source repository URL.

Field homepage#

silk
pub homepage: Option<String>

The project website URL.

Field authors#

silk
pub authors: Option<List<String>>

Author names.

Field keywords#

silk
pub keywords: Option<List<String>>

Discovery keywords.

Field readme#

silk
pub readme: Option<String>

The README path relative to the package directory.

Field include#

silk
pub include: Option<List<String>>

Additional packaged files and directories, also available through Package.path.

Field publish#

silk
pub publish: bool

Whether this package may be published.

Implementation Schema for Package#

silk
impl Schema for Package

Operation spec#

silk
static fn spec() -> Spec<Package>

Operation check#

silk
fn check(self: &Self, checks: &mut Checks<Self>) -> ()

Dependency#

silk
pub struct Dependency

One path, pinned Git commit, pinned archive, or workspace catalog entry.

Field path#

silk
pub path: Option<String>

A local directory, or a subdirectory of the fetched repository or archive.

Field package#

silk
pub package: Option<String>

The selected package name when it differs from the import alias.

Field git#

silk
pub git: Option<String>

A Git repository URL.

Field rev#

silk
pub rev: Option<String>

A complete lowercase Git commit hash.

Field url#

silk
pub url: Option<String>

An HTTPS or local file archive URL.

Field sha256#

silk
pub sha256: Option<String>

The archive's lowercase SHA-256 digest.

Field workspace#

silk
pub workspace: Option<bool>

Selects the same alias from the enclosing workspace catalog.

Field tools#

silk
pub tools: bool

Explicitly authorizes this dependency's sandboxed build tools.

Implementation Schema for Dependency#

silk
impl Schema for Dependency

Operation spec#

silk
static fn spec() -> Spec<Dependency>

Operation check#

silk
fn check(self: &Self, checks: &mut Checks<Self>) -> ()

Workspace#

silk
pub struct Workspace

A workspace's member paths, output directory, and dependency catalog.

Field members#

silk
pub members: List<String>

Package directories or globs relative to this manifest.

Field outputDir#

silk
pub outputDir: String

The build output directory relative to the workspace root.

Field silkVersion#

silk
pub silkVersion: Option<String>

The compiler version selected for workspace members.

Field dependencies#

silk
pub dependencies: Dictionary<Dependency>

Fully specified dependency sources shared by workspace members.

Implementation Schema for Workspace#

silk
impl Schema for Workspace

Operation spec#

silk
static fn spec() -> Spec<Workspace>

Operation check#

silk
fn check(self: &Self, checks: &mut Checks<Self>) -> ()

Native#

silk
pub struct Native

Native files fetched from pinned archives; compilation and linking are graph operations.

Field archive#

silk
pub archive: Dictionary<Archive>

Archives keyed by their package-local names.

Field overrides#

silk
pub overrides: Dictionary<ArchiveOverride>

Local archive replacements keyed by the same names.

Implementation Schema for Native#

silk
impl Schema for Native

Operation spec#

silk
static fn spec() -> Spec<Native>

Archive#

silk
pub struct Archive

One portable archive pin or a table of pins selected by target triple.

Field url#

silk
pub url: Option<String>

The portable archive URL, absent when using target-specific pins.

Field sha256#

silk
pub sha256: Option<String>

The portable archive digest.

Field strip#

silk
pub strip: Option<u32>

The number of directory components removed during extraction.

Field targets#

silk
pub targets: Dictionary<ArchivePin>

Target-specific archive pins.

Implementation Schema for Archive#

silk
impl Schema for Archive

Operation spec#

silk
static fn spec() -> Spec<Archive>

Operation check#

silk
fn check(self: &Self, checks: &mut Checks<Self>) -> ()

ArchivePin#

silk
pub struct ArchivePin

The verified archive downloaded for one target.

Field url#

silk
pub url: String

An HTTPS or local file URL.

Field sha256#

silk
pub sha256: String

The SHA-256 digest of the downloaded bytes.

Field strip#

silk
pub strip: u32

Directory components removed during extraction.

Implementation Schema for ArchivePin#

silk
impl Schema for ArchivePin

Operation spec#

silk
static fn spec() -> Spec<ArchivePin>

ArchiveOverride#

silk
pub struct ArchiveOverride

A developer's local replacement for a downloaded native archive.

Field path#

silk
pub path: String

The local installation directory.

Implementation Schema for ArchiveOverride#

silk
impl Schema for ArchiveOverride

Operation spec#

silk
static fn spec() -> Spec<ArchiveOverride>

Pack#

silk
pub struct Pack

Optional binary archives published beside the source archive.

Field binary#

silk
pub binary: Option<Binary>

Enables binary publication and configures its layout.

Implementation Schema for Pack#

silk
impl Schema for Pack

Operation spec#

silk
static fn spec() -> Spec<Pack>

Binary#

silk
pub struct Binary

Default binary archive settings and target-specific overrides.

Field format#

silk
pub format: String

Archive format: tar.gz or zip.

Field layout#

silk
pub layout: String

Executable placement: bin or flat.

Field include#

silk
pub include: Option<List<String>>

Additional paths copied into every binary archive.

Field target#

silk
pub target: Dictionary<BinaryTarget>

Settings that replace the defaults for each named target.

Implementation Schema for Binary#

silk
impl Schema for Binary

Operation spec#

silk
static fn spec() -> Spec<Binary>

BinaryTarget#

silk
pub struct BinaryTarget

Binary archive settings replaced for one target; absent fields retain the defaults.

Field format#

silk
pub format: Option<String>

The replacement archive format.

Field layout#

silk
pub layout: Option<String>

The replacement executable placement.

Field include#

silk
pub include: Option<List<String>>

The replacement list of additional files.

Implementation Schema for BinaryTarget#

silk
impl Schema for BinaryTarget

Operation spec#

silk
static fn spec() -> Spec<BinaryTarget>

Release#

silk
pub struct Release

Release repository and version-source settings.

Field repository#

silk
pub repository: Option<String>

The GitHub repository as owner/name.

Field directory#

silk
pub directory: Option<String>

The release directory relative to the repository root.

Field versionFile#

silk
pub versionFile: Option<String>

A Silk version constant source file outside .changes.

Implementation Schema for Release#

silk
impl Schema for Release

Operation spec#

silk
static fn spec() -> Spec<Release>

PostInit#

silk
pub struct PostInit

A template command run only by an explicit silk init invocation.

Field command#

silk
pub command: List<String>

The executable followed by its arguments.

Field arguments#

silk
pub arguments: bool

Whether to append arguments passed to silk init after --.

Implementation Schema for PostInit#

silk
impl Schema for PostInit

Operation spec#

silk
static fn spec() -> Spec<PostInit>

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