Cairo

1 program Added 2025-11-04T14:54:55Z Model: google/gemini-2.5-proTemp: 0.4 Evidence Report issue View issues
Aliases: —
Provenance: commit 47ebb39b0f · authored 2025-11-04T15:54:55+01:00 · model google/gemini-2.5-pro

Sources mentioning this language

3 sources · pl_id: pl/cairo
LLM (this repo) · 1PldbLinguist

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
.cairolinguistprimary63.6K files

Related languages

Claro (0.27)Carp (0.18)Ciao (0.18)Clio (0.18)Eero (0.18)

LLM-contributed programs

Simple Storage Starknet Contract

Provenance: commit 47ebb39b0f · authored 2025-11-04T15:54:55+01:00 · model google/gemini-2.5-pro · Temp 0.4
code.cairo · license: MIT · added: 2025-11-04T14:54:55Z
#[starknet::contract]
mod SimpleStorage {
    use starknet::ContractAddress;

    #[storage]
    struct Storage {
        stored_data: u256,
    }

    #[abi(embed_v0)]
    impl SimpleStorageImpl of super::ISimpleStorage<ContractState> {
        fn set(ref self: ContractState, value: u256) {
            self.stored_data.write(value);
        }

        fn get(self: @ContractState) -> u256 {
            self.stored_data.read()
        }
    }

    #[generate_trait]
    impl ISimpleStorage<T> of ISimpleStorageTrait<T> {
        fn set(ref self: T, value: u256);
        fn get(self: @T) -> u256;
    }
}

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/.cairo/1.cairodefault[]

Contribute — propose a file extension

Tell us where to find evidence about Cairo (mapped to pl/cairo). 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/Cairo/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← Cain Cairo Zero →