Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Attributes

Attributes attach narrowly defined metadata to declarations. An attribute is valid only on the syntactic form named by the section that defines it. An unknown attribute, an attribute in any other position, or an attribute with arguments of the wrong form is a static error.

Grammar

attr ::= "linked" "(" stringlit ")"

External Linkage

#[linked("name")] may be applied to an extern declaration. It declares that the function body is supplied by the execution environment under the given linkage name.

#[linked("sha256_compress")]
extern sha256_compress(state: [8]u32, block: [16]u32) [8]u32

The supplied function must have exactly the declared Wyn function type. A program that uses a linked declaration for which the execution environment provides no matching definition cannot be executed.