Code Monkey home page Code Monkey logo

types-rs's Introduction

types-rs

๐Ÿบ Starknet Rust types ๐Ÿฆ€

GitHub Workflow Status Project license Pull Requests welcome Rust docs Rust crate

This repository is an initiative by a group of maintainers to address the fragmentation in the Starknet Rust ecosystem and improve its interoperability. The key motivation behind this repository is to standardize the representation of the Felt (Field Element) type in Rust, which is massively used as the core and atomic type of the Cairo language and its Virtual Machine.

The Felt type is currently defined in many different crates and repositories, resulting in increased code complexity and performance issues due to the need for numerous conversions. This repository aims to mitigate these issues by providing a universal Felt type in Rust.

Crates

This repository hosts two crates:

  • starknet-types-core: This crate provides the universal Felt (Field Element) type for Cairo and STARK proofs. It also focuses on Starknet types related to computation and execution, requiring performance and optimization for specific arithmetic and cryptographic operations.

  • starknet-types-rpc: This crate deals with Starknet types used in RPC communication, serde, and transport.

Usage

You can include any of these crates in your library via crates.io or as a git dependency. For example, to include the starknet-types-core crate, add the following to your Cargo.toml:

As a crates.io dependency:

[dependencies]
starknet-types-core = "0.1.0"

As a git dependency:

[dependencies]
starknet-types-core = { git = "https://github.com/starknet-io/types-rs.git", version = "0.1.0", default-features = false, features = ["serde"] }

Build from source

To build the crates from source, clone the repository and run the following command:

cargo build --release

Testing

To run the tests, clone the repository and run the following command:

cargo test

Contributing

Contributions are welcome! Please read our contributing guidelines for more information.

License

This repository is licensed under the MIT License, see LICENSE for more information.

types-rs's People

Contributors

0xlucqs avatar tcoratger avatar pefontana avatar oppen avatar abdelstark avatar fmoletta avatar maciejka avatar nils-mathieu avatar xjonathanlei avatar avivyossef-starkware avatar damip avatar tdelabro avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.