Practical overview
When it fits
Use Alloy when a Rust application needs blockchain connectivity and you want to select from provider, transport, network and related crates. Consult the feature list and examples when choosing optional integrations.
Who it is for
- Rust developers building applications that need Ethereum or Ethereum-compatible blockchain connectivity.
- Backend developers assembling provider, transport or middleware integrations.
- Developers creating Rust tooling for blockchain networks.
Documented uses
- Connect an application to an Ethereum node through a provider.
- Query node data such as the latest block number and chain ID.
- Add contract interaction, RPC types or signer components to a Rust project.
- Select network and transport features for an application’s blockchain connection.
Requirements & limits
The project is open source under the Apache-2.0 license and is distributed as Rust crates through Cargo.
- The primary integration is a Rust library, so it fits Rust projects rather than providing a ready-made hosted application.
- Default features include contracts, an HTTP provider, Ethereum RPC types and a local signer.
- The
fullfeature adds WebSocket and IPC transports plus commonly used extended RPC APIs, but does not include every optional integration. - Node bindings, ENS, genesis and trie support, and cloud or hardware signers require separate opt-in features or crates.
- The documentation demonstrates a network-generic provider pattern, including an Optimism example using
op-alloy.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Add Alloy and select connectivity features
Include Alloy in a Rust project and choose the documented default or expanded provider feature set.
Before you start
- A Rust project that uses Cargo
Steps
Add the
alloycrate with the command below, or specifyalloy = "2"inCargo.toml.cargo add alloyUse the default features for contracts, an HTTP provider, Ethereum RPC types and a local signer.
For WebSocket and IPC transports plus commonly used extended RPC APIs, add Alloy with the
fullfeature.Enable additional integrations such as node bindings separately when needed;
fulldoes not include them.
Expected outcome
The Rust project has Alloy configured with either its default feature set or the documented `full` convenience bundle.
Guide limitations
fulldoes not include every optional integration.- The setup steps do not cover application-specific configuration or deployment.
Connect a provider and query Ethereum node data
Use Alloy’s documented HTTP provider pattern to request the latest block number and chain ID.
Before you start
- A Rust project with Alloy’s default features
- An Ethereum node RPC URL
Steps
Create a provider with
ProviderBuilderand connect it to the node’s RPC URL.Use the provider to request the latest block number.
Request the chain ID and handle the results in the application.
Expected outcome
The application has a provider connection pattern for querying the latest block number and chain ID.
Guide limitations
- The example uses a particular public RPC URL; no provider service terms or reliability are specified.
- The documented example does not provide deployment instructions.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 2 October 2026
- Original website title
- alloy-rs/alloy · Official homepage title · retained in its source language
Related options
ethers-rs — Alloy is described by its project documentation as a ground-up rewrite of ethers-rs.

