Rust Dependencies

Substreams Rust APIs

Rust crates overview

The official substreams crate helps developers create module handlers.

Note: If a crate is not available for Substreams, you can use the spkg release for the chain, which includes the Block protobuf model, and generate the Rust structs yourself.

Third-party libraries

Any third-party library capable of compiling wasm32 can be used for execution in Substreams services.

Some libraries include kernel syscalls or other operations unavailable in the Substreams execution environment and cannot be compiled to WASM. The internal functionality of third-party libraries is an essential consideration for Substreams development.

Helpful information people found through the use of third-party libraries and Substreams together include:

  • tiny_keccak: an implementation of Keccak-derived functions specified in FIPS-202, SP800-185, and KangarooTwelve.

Git Versions

Specifying dependencies from Git repositories is possible in Rust, but it is NOT recommended by the Substreams team, as they are not fully tested and can bring bugs to your Substreams project.

The Substreams team recommends using the templates provided in the Examples section as a starting point to develop your Substreams application.

Last updated