Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/starkware-libs/cairo
Cairo is the first Turing-complete language for creating provable programs for general computation.
https://github.com/starkware-libs/cairo
cairo computational-integrity starknet zero-knowledge-proofs zkp
Last synced: 5 days ago
JSON representation
Cairo is the first Turing-complete language for creating provable programs for general computation.
- Host: GitHub
- URL: https://github.com/starkware-libs/cairo
- Owner: starkware-libs
- License: apache-2.0
- Created: 2022-05-19T12:19:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-31T11:47:18.000Z (12 days ago)
- Last Synced: 2025-01-01T09:14:47.108Z (11 days ago)
- Topics: cairo, computational-integrity, starknet, zero-knowledge-proofs, zkp
- Language: Rust
- Homepage:
- Size: 165 MB
- Stars: 1,649
- Watchers: 19
- Forks: 530
- Open Issues: 107
-
Metadata Files:
- Readme: README.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: docs/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: docs/SECURITY.md
Awesome Lists containing this project
- awesome-rust - cairo - Cairo is the first Turing-complete language for creating provable programs for general computation. This is also the native language of [StarkNet](https://www.starknet.io/en), a ZK-Rollup using STARK proofs ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/starkware-libs/cairo/CI?style=flat-square&logo=github) (Applications / Blockchain)
- awesome-rust-cn - cairo - (应用程序 Applications / 加密货币 Cryptocurrencies)
- awesome-starknet - starkware-libs/cairo - Official Cairo Github repository. (Resources)
- awesome-rust - cairo - Cairo is the first Turing-complete language for creating provable programs for general computation. This is also the native language of [StarkNet](https://www.starknet.io), a ZK-Rollup using STARK proofs ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/starkware-libs/cairo/CI?style=flat-square&logo=github) (Applications / Blockchain)
- fucking-awesome-rust - cairo - Cairo is the first Turing-complete language for creating provable programs for general computation. This is also the native language of 🌎 [StarkNet](www.starknet.io), a ZK-Rollup using STARK proofs ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/starkware-libs/cairo/CI?style=flat-square&logo=github) (Applications / Blockchain)
- awesome-rust-list - Cairo - libs/cairo?style=social"/> : Cairo is the first Turing-complete language for creating provable programs for general computation. ⚡ Blazing ⚡ fast ⚡ compiler for Cairo, written in 🦀 Rust 🦀 (Web3 and ZKP Framework)
- awesome-rust-list - Cairo - libs/cairo?style=social"/> : Cairo is the first Turing-complete language for creating provable programs for general computation. ⚡ Blazing ⚡ fast ⚡ compiler for Cairo, written in 🦀 Rust 🦀 (Web3 and ZKP Framework)
- fucking-awesome-rust - cairo - Cairo is the first Turing-complete language for creating provable programs for general computation. This is also the native language of 🌎 [StarkNet](www.starknet.io), a ZK-Rollup using STARK proofs ![GitHub Workflow Status](https://img.shields.io/github/workflow/status/starkware-libs/cairo/CI?style=flat-square&logo=github) (Applications / Blockchain)
README
Cairo 🐺
⚡ Blazing ⚡ fast ⚡ compiler for Cairo, written in 🦀 Rust 🦀
Report a Bug
-
Request a Feature
-
Ask a Question
[![GitHub Workflow Status](https://github.com/starkware-libs/cairo/actions/workflows/ci.yml/badge.svg)](https://github.com/starkware-libs/cairo/actions/workflows/ci.yml)
[![Project license](https://img.shields.io/github/license/starkware-libs/cairo.svg?style=flat-square)](LICENSE)
[![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/starkware-libs/cairo/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)Table of Contents
- [About](#about)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Compiling and running Cairo files](#compiling-and-running-cairo-files)
- [Compiling Starknet Contracts](#compiling-starknet-contracts)
- [Development](#development)
- [Install the language server](#install-the-language-server)
- [Roadmap](#roadmap)
- [Support](#support)
- [Project assistance](#project-assistance)
- [Contributing](#contributing)
- [Authors \& contributors](#authors--contributors)
- [Security](#security)
- [License](#license)---
## About
Cairo is the first Turing-complete language for creating provable programs for general computation.
## Getting Started
### Prerequisites
- Install [Rust](https://www.rust-lang.org/tools/install)
- Setup Rust:
```bash
rustup override set stable && rustup update
```Ensure rust was installed correctly by running the following from the root project directory:
```bash
cargo test
```### Compiling and running Cairo files
Compile Cairo to Sierra:
```bash
cargo run --bin cairo-compile -- --single-file /path/to/input.cairo /path/to/output.sierra --replace-ids
```Compile Sierra to casm (Cairo assembly):
```bash
cargo run --bin sierra-compile -- /path/to/input.sierra /path/to/output.casm
```Run Cairo code directly:
```bash
cargo run --bin cairo-run -- --single-file /path/to/file.cairo
```See more information [here](./crates/cairo-lang-runner/README.md). You can also find Cairo examples in the [examples](./examples) directory.
For running tests specifically, see here: [cairo-test](./crates/cairo-lang-test-runner/README.md)
### Compiling Starknet Contracts
Compile a Starknet Contract to a Sierra ContractClass:
```bash
cargo run --bin starknet-compile -- --single-file /path/to/input.cairo /path/to/output.json
```Or specify the contract path if multiple contracts are defined in the same project:
```bash
cargo run --bin starknet-compile -- /path/to/input/crate /path/to/output.json --contract-path path::to::contract
```Compile the ContractClass of a CompiledClass:
```bash
cargo run --bin starknet-sierra-compile -- /path/to/input.json /path/to/output.casm
```## Roadmap
The next milestone is to reach feature parity with the old Cairo version.
You can track the exact progress [here](./docs/FEATURE_PARITY.md).## Support
- We encourage developers to ask and answer questions on [stackoverflow](https://stackoverflow.com/questions/tagged/cairo-lang).
- Contact options listed on [this GitHub profile](https://github.com/starkware-libs)## Project assistance
If you want to say **thank you** or/and support active development of Cairo:
- Add a [GitHub Star](https://github.com/starkware-libs/cairo) to the project.
- Tweet about your Cairo work.
- Write interesting articles about the project on [Dev.to](https://dev.to/), [Medium](https://medium.com/) or your personal blog.Together, we can make Cairo **better**!
## Contributing
First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are **greatly appreciated**.
Please read [our contribution guidelines](docs/CONTRIBUTING.md), and thank you for being involved!
## Authors & contributors
For a full list of all authors and contributors, see [the contributors page](https://github.com/starkware-libs/cairo/contributors).
## Security
Cairo follows good practices of security, but 100% security cannot be assured.
Cairo is provided **"as is"** without any **warranty**. Use at your own risk._For more information and to report security issues, please refer to our [security documentation](docs/SECURITY.md)._
## License
This project is licensed under the **Apache 2.0**.
See [LICENSE](LICENSE) for more information.