Module core

Module core 

Source
Expand description

§Starknet data types

// TODO: add starknet-rust-core documentation

§Benchmark

These results were generated on the author’s machine with Apple M3 Max running macOS 14.5.

For instructions on running the benchmarks yourself, check out this page.

§Native

cairo0_class_hash       time:   [9.1665 ms 9.1690 ms 9.1718 ms]
sierra_class_hash       time:   [6.6931 ms 6.6944 ms 6.6958 ms]

§WebAssembly

(Results are only provided for wasmtime here. Check out the benchmark page for running the benchmark on other runtimes).

Runtime version:

$ wasmtime --version
wasmtime-cli 21.0.1 (cedf9aa0f 2024-05-22)

wasmtime results:

cairo0_class_hash       time:   [36.515 ms 36.526 ms 36.538 ms]
sierra_class_hash       time:   [22.550 ms 22.557 ms 22.567 ms]

Modules§

chain_id
Chain IDs for commonly used public Starknet networks.
codec
Types for serializing high-level Cairo types into field elements and vice versa.
crypto
High-level utilities for cryptographic operations used in Starknet.
serde
Module containing custom serialization/deserialization implementations.
types
Module containing core types for representing objects in Starknet.
utils
Utilities for performing commonly used algorithms in Starknet.