From 00e1611592f88c9a895bf0396de6b29eb88b3094 Mon Sep 17 00:00:00 2001 From: Santiago Carmuega Date: Sun, 3 Nov 2024 10:51:34 -0300 Subject: [PATCH] chore: update root crate re-exports (#536) --- pallas/Cargo.toml | 2 ++ pallas/src/lib.rs | 47 +++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 41 insertions(+), 8 deletions(-) diff --git a/pallas/Cargo.toml b/pallas/Cargo.toml index 78b61b3..20c27a1 100644 --- a/pallas/Cargo.toml +++ b/pallas/Cargo.toml @@ -20,6 +20,7 @@ pallas-codec = { version = "=0.30.2", path = "../pallas-codec/" } pallas-utxorpc = { version = "=0.30.2", path = "../pallas-utxorpc/" } pallas-configs = { version = "=0.30.2", path = "../pallas-configs/" } pallas-txbuilder = { version = "=0.30.2", path = "../pallas-txbuilder/" } +pallas-math = { version = "=0.30.2", path = "../pallas-math/", optional = true } pallas-applying = { version = "=0.30.2", path = "../pallas-applying/", optional = true } pallas-rolldb = { version = "=0.30.2", path = "../pallas-rolldb/", optional = true } pallas-wallet = { version = "=0.30.2", path = "../pallas-wallet/", optional = true } @@ -30,4 +31,5 @@ rolldb = ["pallas-rolldb"] hardano = ["pallas-hardano"] wallet = ["pallas-wallet"] applying = ["pallas-applying"] +math = ["pallas-math"] unstable = ["rolldb", "hardano", "wallet", "applying"] diff --git a/pallas/src/lib.rs b/pallas/src/lib.rs index d1ac4fd..d2cb4cf 100644 --- a/pallas/src/lib.rs +++ b/pallas/src/lib.rs @@ -25,7 +25,13 @@ pub mod ledger { pub use pallas_addresses as addresses; #[doc(inline)] + // WARNING: this is deprecated, use `pallas::interop::hardano::configs` instead. + // Since deprecation notices don't work for re-exports we don't have a way to notify users. pub use pallas_configs as configs; + + #[doc(inline)] + #[cfg(feature = "pallas-applying")] + pub use pallas_applying as rules; } #[doc(inline)] @@ -34,32 +40,57 @@ pub use pallas_crypto as crypto; #[doc(inline)] pub use pallas_codec as codec; +#[doc(inline)] +#[cfg(feature = "pallas-math")] +pub use pallas_math as math; + pub mod interop { //! Interoperability with other protocols, formats & systems #[doc(inline)] pub use pallas_utxorpc as utxorpc; + + #[cfg(feature = "pallas-hardano")] + pub mod hardano { + //! Interoperability with the Haskell Cardano node + + #[doc(inline)] + pub use pallas_hardano::storage; + + #[doc(inline)] + pub use pallas_configs as configs; + } } pub mod storage { //! Storage engines for chain-related persistence - #[cfg(feature = "rolldb")] - #[doc(inline)] - pub use pallas_rolldb as rolldb; - - #[cfg(feature = "hardano")] + #[cfg(feature = "pallas-hardano")] #[doc(inline)] + // WARNING: this is deprecated, use `pallas::interop::hardano::storage` instead. + // Since deprecation notices don't work for re-exports we don't have a way to notify users. pub use pallas_hardano::storage as hardano; } #[doc(inline)] -#[cfg(feature = "applying")] +#[cfg(feature = "pallas-applying")] +// WARNING: this is deprecated but since deprecation notices don't work for re-exports +// we don't have a way to notify users. pub use pallas_applying as applying; -#[doc(inline)] #[cfg(feature = "wallet")] -pub use pallas_wallet as wallet; +pub mod wallet { + //! Utilities for wallet implementations + + #[doc(inline)] + #[cfg(feature = "pallas-wallet")] + pub use pallas_wallet as keystore; + + #[doc(inline)] + pub use pallas_txbuilder as txbuilder; +} #[doc(inline)] +// WARNING: this is deprecated, use `pallas::wallet::txbuilder` instead. +// Since deprecation notices don't work for re-exports we don't have a way to notify users. pub use pallas_txbuilder as txbuilder;