/avalanche-rs

Avalanche APIs/VM SDK in Rust

Primary LanguageRustOtherNOASSERTION

avalanche-rs

Github Actions Latest Ecosystem license

⚠️ avalanche-rs is alpha-level software and is not ready for production use. Do not use avalanche-rs to run production workloads. See the license for more information regarding usage.

avalanche-rs is a collection of crates that provides all the necessary abstractions to develop Rust-based applications and VMs in the Avalanche ecosystem. It provides the canonical type definitions of all of the various Avalanche APIs, on par with those in avalanchego, but for Rust developers.

avalanche-rs is composed of several crates:

  • core - Core networking components for a p2p Avalanche node.
  • avalanche-consensus - A Rust implementation of the novel Avalanche consensus protocol.
  • avalanche-types - Foundational types used in Avalanche, including those used by the JSON-RPC API and the EVM.
  • A Rust SDK for developing Avalanche VMs.

For detailed developer documentation, check out the crate level documentation for avalanche-types and avalanche-consensus.

Goals of avalanche-rs

Provide Interoperability with avalanchego

avalanche-rs provides core modules and APIs designed to build clients and other Avalanche tooling in Rust. Rust clients can interact with existing avalanchego clients.

Ergonomic, modular APIs

avalanche-rs provides a wide set of modules to use as imports in other projects. Each module is small in scope and can be imported separately as needed.

Enable Rust Developers to Build VMs

The Rust SDK in subnet provides tools to build Rust VMs on Avalanche.

Releasing New Versions

To release a new version, first be sure to increment the version in the Cargo.toml file for one or both of avalanche-types and avalanche-consensus to the new version. It's not possible to republish an existing version of a crate on crates.io. The other crates in this project are not published and do not need to be updated. Be sure the version is semver-compatible.

Once the version is incremented, checkout the main branch and pull latest. Next create and push a tag with the name of the crate followed by the new crate version (for example, avalanche-types-v0.1.0). The CI automation will generate a draft release. Once that released is published CI will automatically push the latest versions of the crate in the tag to crates.io.

License

avalanche-rs is licensed under the Ecosystem License.

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.