402 releases
0.1.5 | Feb 27, 2024 |
---|---|
0.1.4 | Oct 6, 2023 |
0.1.3 | Sep 18, 2023 |
0.0.400 | Jul 25, 2023 |
0.0.24 | Jul 22, 2022 |
#3 in #avalanche
155 downloads per month
Used in 6 crates
(5 directly)
3MB
55K
SLoC
avalanche-types
Introduction
The avalanche-types
crate implements and is the canonical representation of Avalanche primitive types in Rust. Avalanche types are separated by modules and are all under the src
directory.
This crate also provides an SDK library for developing subnets in Rust. For the SDK functionality, see src/subnet
which contains everything required to build a subnet VM in Rust.
The following VMs were built with the SDK:
- Simple Rust VM: TimestampVM
- Complex Rust VM: SpacesVM
Getting Started
Examples can be found in examples
and are a good first step to getting an understanding of general usage.
Resources
- How to Build a Simple Rust VM tutorial provides a basic example of using the Rust SDK.
- TimestampVM Template allows you to quickly generate a TimestampVM based project with cargo generate
Rust Version
This project uses the latest stable Rust toolchain.
Getting Help
First please try find the answer to your question in the code documentation. If more clarification is required, try opening an issue with the question.
Features
- Ids (e.g.,
src/ids
) - Transaction types/serialization (e.g.,
src/platformvm/txs
) - Certificates (e.g.,
src/key/cert
) - Keys and addresses (e.g.,
src/key/secp256k1
) - Peer-to-peer messages (e.g.,
src/message
) - RPC chain VM (e.g.,
src/subnet/rpc
) - Genesis generate helper (e.g.,
src/subnet_evm
) - Protobuf generated stubs and helpers (e.g.,
src/proto
) - AvalancheGo APIs (e.g.,
/src/avalanchego
)
The basic types available in this crate are used in other Avalanche Rust projects (e.g., distributed load tester blizzard
, avalanche-ops
).
Dependencies
~34–55MB
~1M SLoC