-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Description Introduces a meta crate like `alloy` that re-exports all `op-alloy-*` crates behind respective feature flags.
- Loading branch information
Showing
5 changed files
with
127 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
[package] | ||
name = "op-alloy" | ||
description = "Connect applications to the OP Stack" | ||
version.workspace = true | ||
edition.workspace = true | ||
rust-version.workspace = true | ||
authors.workspace = true | ||
license.workspace = true | ||
homepage.workspace = true | ||
repository.workspace = true | ||
exclude.workspace = true | ||
|
||
[package.metadata.docs.rs] | ||
all-features = true | ||
rustdoc-args = ["--cfg", "docsrs"] | ||
|
||
[lints] | ||
workspace = true | ||
|
||
[dependencies] | ||
# Workspace | ||
op-alloy-consensus = { workspace = true, optional = true } | ||
op-alloy-genesis = { workspace = true, optional = true } | ||
op-alloy-network = { workspace = true, optional = true } | ||
op-alloy-protocol = { workspace = true, optional = true } | ||
op-alloy-provider = { workspace = true, optional = true } | ||
op-alloy-rpc-jsonrpsee = { workspace = true, optional = true } | ||
op-alloy-rpc-types-engine = { workspace = true, optional = true } | ||
op-alloy-rpc-types = { workspace = true, optional = true } | ||
|
||
[features] | ||
default = ["std", "k256", "serde"] | ||
|
||
std = [ | ||
"op-alloy-consensus?/std", | ||
"op-alloy-genesis?/std", | ||
"op-alloy-protocol?/std", | ||
"op-alloy-rpc-types?/std", | ||
"op-alloy-rpc-types-engine?/std", | ||
] | ||
|
||
full = [ | ||
"consensus", | ||
"genesis", | ||
"provider", | ||
"network", | ||
"protocol", | ||
"rpc-types", | ||
"rpc-types-engine", | ||
"rpc-jsonrpsee", | ||
] | ||
|
||
k256 = [ | ||
"op-alloy-consensus?/k256", | ||
] | ||
|
||
arbitrary = [ | ||
"op-alloy-consensus?/arbitrary", | ||
"op-alloy-genesis?/arbitrary", | ||
"op-alloy-protocol?/arbitrary", | ||
"op-alloy-rpc-types?/arbitrary", | ||
"op-alloy-rpc-types-engine?/arbitrary", | ||
] | ||
|
||
serde = [ | ||
"op-alloy-consensus?/serde", | ||
"op-alloy-genesis?/serde", | ||
"op-alloy-protocol?/serde", | ||
"op-alloy-rpc-types-engine?/serde", | ||
] | ||
|
||
# `no_std` support | ||
consensus = ["dep:op-alloy-consensus"] | ||
genesis = ["dep:op-alloy-genesis"] | ||
protocol = ["dep:op-alloy-protocol"] | ||
rpc-types = ["dep:op-alloy-rpc-types"] | ||
rpc-types-engine = ["dep:op-alloy-rpc-types-engine"] | ||
|
||
# std features | ||
provider = ["dep:op-alloy-provider"] | ||
network = ["dep:op-alloy-network"] | ||
rpc-jsonrpsee = ["dep:op-alloy-rpc-jsonrpsee"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
#![doc = include_str!("../README.md")] | ||
#![doc( | ||
html_logo_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/alloy.jpg", | ||
html_favicon_url = "https://raw.githubusercontent.com/alloy-rs/core/main/assets/favicon.ico" | ||
)] | ||
#![cfg_attr(not(test), warn(unused_crate_dependencies))] | ||
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))] | ||
|
||
#[cfg(feature = "consensus")] | ||
#[doc(inline)] | ||
pub use op_alloy_consensus as consensus; | ||
|
||
#[cfg(feature = "genesis")] | ||
#[doc(inline)] | ||
pub use op_alloy_genesis as genesis; | ||
|
||
#[cfg(feature = "network")] | ||
#[doc(inline)] | ||
pub use op_alloy_network as network; | ||
|
||
#[cfg(feature = "protocol")] | ||
#[doc(inline)] | ||
pub use op_alloy_protocol as protocol; | ||
|
||
#[cfg(feature = "provider")] | ||
#[doc(inline)] | ||
pub use op_alloy_provider as provider; | ||
|
||
#[cfg(feature = "rpc-types")] | ||
#[doc(inline)] | ||
pub use op_alloy_rpc_types as rpc_types; | ||
|
||
#[cfg(feature = "rpc-types-engine")] | ||
#[doc(inline)] | ||
pub use op_alloy_rpc_types_engine as rpc_types_engine; | ||
|
||
#[cfg(feature = "rpc-jsonrpsee")] | ||
#[doc(inline)] | ||
pub use op_alloy_rpc_jsonrpsee as rpc_jsonrpsee; |