Our work

We built the most used Cairo resource.

The Cairo Book is an open-source guide to Cairo, the language of Starknet smart contracts. We built it with the Cairo community for Starkware and the Starknet Foundation.

Client
Starkware and the Starknet Foundation
Project
The Cairo Book
Started
April 2023

Overview

What is The Cairo Book?

Cairo is a programming language for writing programs that can be proved to have run correctly. It is also the language you use to write smart contracts on Starknet.

The Cairo Book teaches it from basic syntax through advanced features and contract development. Cairo is strongly inspired by Rust, so the book adapts many examples and explanations from the Rust Book.

The problem

Teaching a language that keeps changing

To build on Starknet, a developer first has to learn Cairo. The language and its ecosystem move quickly, so a guide can fall behind fast.

The book also had to work for beginners and advanced readers, make hard blockchain concepts clear, and stay accurate and consistent with many people writing it.

What happened

Where the book is today

The book now lives on starknet.io. The Cairo website links to it from its main menu, and Starknet's developer page sends people there to learn the language.

Readers can run code in the browser without installing anything, and the book comes in six languages. It is still maintained in the open and follows the latest Cairo release, so developers do not have to learn from an outdated guide.

Contact our team

We take 4 protocols per quarter. Formal verification demands deep focus. We'd rather verify fewer contracts well than many poorly.

Continue reading

Learn more

Read The Cairo Book and see the source on GitHub.

The Cairo Core Library, the language documentation we wrote for Starkware.