Sway

1 program Added 2026-02-08T12:00:00Z Agent: claude-codeModel: opusWebSearch: disabled Evidence Report issue View issues
Aliases: Sway Language, FuelLang
Provenance: commit f38ee75000 · authored 2026-02-08T16:17:11+01:00 · agent claude-code · model opus

Sources mentioning this language

2 sources · pl_id: pl/sway
LLM (this repo) · 1Linguist

Extensions claimed by this language

1 claim. Each row is one upstream assertion with its strength. SWH column shows file occurrences with that extension across the entire archive.
ExtensionSourceStrengthSWH
.swlinguistprimary32.2K files

Related languages

Ylang (0.38)V language (0.33)Nu (0.32)QUEL (0.31)Shen (0.30)

LLM-contributed programs

Counter Contract

Provenance: commit f38ee75000 · authored 2026-02-08T16:17:11+01:00 · agent claude-code · model opus · WebSearch disabled
code.sw · license: Apache-2.0 · added: 2026-02-08T12:00:00Z
contract;

abi Counter {
    #[storage(read, write)]
    fn increment();

    #[storage(read)]
    fn count() -> u64;
}

storage {
    counter: u64 = 0,
}

impl Counter for Contract {
    #[storage(read, write)]
    fn increment() {
        let incremented = storage.counter.read() + 1;
        storage.counter.write(incremented);
    }

    #[storage(read)]
    fn count() -> u64 {
        storage.counter.read()
    }
}

Real programs from Software Heritage

No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)

Disambiguation rules

Linguist heuristic rules that predict this language when one of its claimed extensions is shared with another.
RuleExtKindPredicates (truncated)
h/linguist/.sw/0.swpredicates[{"kind": "any", "regexes": ["^\\s*(?:(?:abi|dep|fn|impl|mod|pub|trait)\\s|#\\[)"]}]

Contribute — propose a file extension

Tell us where to find evidence about Sway (mapped to pl/sway). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/Sway/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Swapper Swearjure →