Find something...
K
Github
The Cairo Programming Language
Foreword
Introduction
Getting Started
Installation
Hello, World!
Hello, Scarb!
Common Programming Concepts
Common Programming Concepts
Variables and Mutability
Data Types
Functions
Comments
Control Flow
Common Collections
Understanding Ownership
Understanding Ownership
What is Ownership?
References and Snapshots
Using Structs to Structure Related Data
Using Structs to Structure Related Data
Defining and Instantiating Structs
An Example Program Using Structs
Method Syntax
Enums and Pattern Matching
Enums and Pattern Matching
Enums
The Match Control Flow Construct
Managing Cairo Projects with Packages, Crates and Modules
Managing Cairo Projects with Packages, Crates and Modules
Packages and Crates
Defining Modules to Control Scope
Paths for Referring to an Item in the Module Tree
Bringing Paths into Scope with the 'use' Keyword
Separating Modules into Different Files
Generic Data Types
Generic Types
Generic Functions
Traits in Cairo
Testing Cairo Programs
Testing Cairo Programs
How To Write Tests
Testing Organization
Error Handling
Error Handling
Unrecoverable Errors with panic
Recoverable Errors with Result
Starknet smart contracts
Starknet Smart Contracts
Writing Starknet Contracts
ABIs and Cross-contract Interactions
ABIs and Interfaces
Contract Dispatchers, Library Dispachers and system calls
Appendix
Appendix
A - Useful Development Tools
Testing Cairo Programs