Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/keep-starknet-strange/alexandria

Community maintained Cairo libraries and set of well maintained, optimised and secure components.
https://github.com/keep-starknet-strange/alexandria

cairo-lang libraries zkp

Last synced: 3 months ago
JSON representation

Community maintained Cairo libraries and set of well maintained, optimised and secure components.

Lists

README

        


Alexandria





Report a Bug
-
Request a Feature
-
Ask a Question



[![GitHub Workflow Status](https://github.com/keep-starknet-strange/alexandria/actions/workflows/test.yml/badge.svg)](https://github.com/keep-starknet-strange/alexandria/actions/workflows/test.yml)
[![Project license](https://img.shields.io/github/license/keep-starknet-strange/alexandria.svg?style=flat-square)](LICENSE)
[![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/keep-starknet-strange/alexandria/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22)

Table of Contents

- [Report a Bug](#report-a-bug)
- [Request a Feature](#request-a-feature)
- [About](#about)
- [Features](#features)
- [Getting Started](#getting-started)
- [Prerequisites](#prerequisites)
- [Installation](#installation)
- [Usage](#usage)
- [Build](#build)
- [Run](#run)
- [Test](#test)
- [Format](#format)
- [Roadmap](#roadmap)
- [Support](#support)
- [Project assistance](#project-assistance)
- [Contributing](#contributing)
- [Authors \& contributors](#authors--contributors)
- [Security](#security)
- [License](#license)
- [Acknowledgements](#acknowledgements)
- [Contributors ✨](#contributors-)

---

## About

Alexandria is a community maintained standard library for Cairo 1.0.
It is a collection of useful algorithms and data structures implemented in Cairo.
Current version can be found in the [toml file](./Scarb.toml)

## Features

This repository is composed of multiple crates:

- [ASCII](./src/ascii/README.md)
- [Data Structures](./src/data_structures/README.md)
- [Encoding](./src/encoding/README.md)
- [Linalg](./src/linalg/README.md)
- [Math](./src/math/README.md)
- [Numeric](./src/numeric/README.md)
- [Searching](./src/searching/README.md)
- [Sorting](./src/sorting/README.md)
- [Storage](./src/storage/README.md)
- [Bytes](./src/bytes/README.md)

## Getting Started

### Prerequisites

- [Cairo](https://github.com/starkware-libs/cairo)
- [Scarb](https://docs.swmansion.com/scarb)
- [Rust](https://www.rust-lang.org/tools/install)

### Installation

Alexandria is a collection of utility Cairo packages, which have to be added as dependencies separately.
For example, the `alexandria_math` package can be installed by adding the following line to your `Scarb.toml`:

```toml
[dependencies]
alexandria_math = { git = "https://github.com/keep-starknet-strange/alexandria.git" }
```

then add the following line in your `.cairo` file

```rust
use alexandria_math::sha512::sha512;
```

## Usage

### Build

```bash
scarb build
```

### Test

```bash
scarb test
```
Running a specific subset of tests
```bash
scarb test -f math
```

### Format

```bash
scarb fmt
```

## Roadmap

See the [open issues](https://github.com/keep-starknet-strange/alexandria/issues) for a list of proposed features (and known issues).

- [Top Feature Requests](https://github.com/keep-starknet-strange/alexandria/issues?q=label%3Aenhancement+is%3Aopen+sort%3Areactions-%2B1-desc) (Add your votes using the 👍 reaction)
- [Top Bugs](https://github.com/keep-starknet-strange/alexandria/issues?q=is%3Aissue+is%3Aopen+label%3Abug+sort%3Areactions-%2B1-desc) (Add your votes using the 👍 reaction)
- [Newest Bugs](https://github.com/keep-starknet-strange/alexandria/issues?q=is%3Aopen+is%3Aissue+label%3Abug)

## Support

Reach out to the maintainer at one of the following places:

- [GitHub Discussions](https://github.com/keep-starknet-strange/alexandria/discussions)
- Contact options listed on [this GitHub profile](https://github.com/starknet-exploration)

## Project assistance

If you want to say **thank you** or/and support active development of Alexandria:

- Add a [GitHub Star](https://github.com/keep-starknet-strange/alexandria) to the project.
- Tweet about the Alexandria.
- Write interesting articles about the project on [Dev.to](https://dev.to/), [Medium](https://medium.com/) or your personal blog.

Together, we can make Alexandria **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/keep-starknet-strange/alexandria/contributors).

## Security

Alexandria follows good practices of security, but 100% security cannot be assured.
Alexandria 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 **MIT license**.

See [LICENSE](LICENSE) for more information.

## Acknowledgements

- [TheAlgorithms/Rust](https://github.com/TheAlgorithms/Rust) for inspiration regarding the implementation of algorithms.

## Contributors ✨

Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):



Abdel @ StarkWare
Abdel @ StarkWare

💻
Santiago Galván (Dub)
Santiago Galván (Dub)

💻
Damián Piñones
Damián Piñones

💻
greged93
greged93

💻
Marek Kaput
Marek Kaput

💻
amanusk
amanusk

💻
Mathieu
Mathieu

💻


0xevolve
0xevolve

💻
Jordy Romuald
Jordy Romuald

💻
gaetbout
gaetbout

💻
Lucas @ StarkWare
Lucas @ StarkWare

💻
Milan Cermak
Milan Cermak

💻
Paweł
Paweł

💻
Ondřej Sojka
Ondřej Sojka

💻


tedison
tedison

💻
raphaelDkhn
raphaelDkhn

💻
Charles Lanier
Charles Lanier

💻
omahs
omahs

💻
Maciej Kamiński
Maciej Kamiński

💻
Bal7hazar @ Carbonable
Bal7hazar @ Carbonable

💻
kahi
kahi

💻


0xTitan
0xTitan

💻
Erim
Erim

💻
maciektr
maciektr

💻
lambda-0x
lambda-0x

💻
Elias Tazartes
Elias Tazartes

💻
akhercha
akhercha

💻
azurwastaken
azurwastaken

💻






Add your contributions



This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

[scarb]: https://github.com/software-mansion/scarb