Using the Rust Toolchain

For basic instructions on using the Rust to Valida compiler toolchain, see QUICK START: Valida Compiler Toolchain. This page covers more advanced usage instructions for the Rust to Valida toolchain.

Keccak acceleration

The Valida VM has the capability of accelerated Keccak hash proving. To use this capability in Rust, you can simply import sha3::Keccak256 and use the Keccak hasher in the sha3 crate in the usual way. The keccak-crate example located at /valida-toolchain/examples/rust/keccak-crate exemplifies this usage. You must use Lita's forked version of the Keccak crate, using a line in your Cargo.toml such as:

[dependencies]
sha3 = { git = "https://github.com/lita-xyz/hashes", default-features = false }

Last updated