Core libraries at the root of the Rust Ethereum ecosystem.
Alloy is a rewrite of ethers-rs from the ground up, with exciting new features, high performance & excellent docs. Ethers-rs will continue to be maintained until we have feature-parity in Alloy. No action is needed from devs.
This repository contains the following crates:
alloy-primitives
- Primitive integer and byte typesalloy-sol-type-parser
- A simple parser for Solidity type stringsalloy-json-abi
- [JSON-ABI] implementationalloy-dyn-abi
- Run-time ABI and EIP-712 implementationsalloy-sol-types
- Compile-time ABI and EIP-712 implementationsalloy-sol-macro
- Thesol!
procedural macrosyn-solidity
-syn
-powered Solidity parser, used byalloy-sol-macro
Alloy will keep a rolling MSRV (minimum supported rust version) policy of at least 6 months. When increasing the MSRV, the new Rust version must have been released at least six months ago. The current MSRV is 1.65.0.
Note that the MSRV is not increased automatically, and only as part of a minor release.
Thanks for your help improving the project! We are so happy to have you! We have a contributing guide to help you get involved in the Alloy project.
Pull requests will not be merged unless CI passes, so please ensure that your contribution follows the linting rules and passes clippy.
We provide full support for all the wasm*-*
targets. If a crate does not
build on a WASM target, please open an issue.
When building for the wasm32-unknown-unknown
target and the "getrandom"
feature is enabled, compilation for the getrandom
crate will fail. This is
expected: see their documentation for more details.
To fix this, either disable the "getrandom"
feature on alloy-core
or add
getrandom
to your dependencies with the "js"
feature enabled:
getrandom = { version = "0.2", features = ["js"] }
There is currently no plan to provide an official JS/TS-accessible library interface, as we believe viem or ethers.js serve that need very well.
We intend these crates to support no_std
with alloc
, and have written them
with that in mind. However, a key dependency, ruint
, does not yet support
no_std
. We strive to maintain no_std
+ alloc
compatibility, and intend to
contribute upstream PRs to achieve it in ruint.
None of these crates would have been possible without the great work done in:
Licensed under either of Apache License, Version 2.0 or MIT license at your option.Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in these crates by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.