From 2fdc401696f7a071d0e5edbf704c9e1c5424cb4f Mon Sep 17 00:00:00 2001 From: srdtrk <59252793+srdtrk@users.noreply.github.com> Date: Thu, 9 Nov 2023 20:17:57 +0300 Subject: [PATCH] imp: removed library feature (#20) * imp: removed library feature * deps(owner): updated Cargo.toml --- Cargo.toml | 5 +++-- src/ibc/mod.rs | 4 ++-- src/lib.rs | 2 +- testing/contracts/cw-ica-owner/Cargo.toml | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 19fd0a08..53bd8ae4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,8 +33,9 @@ overflow-checks = true [features] # for more explicit tests, cargo test --features=backtraces backtraces = ["cosmwasm-std/backtraces"] -# use library feature to disable all instantiate/execute/query exports -library = [] +# disable export feature to disable all instantiate/execute/query exports +default = ["export"] +export = [] [package.metadata.scripts] optimize = """docker run --rm -v "$(pwd)":/code \ diff --git a/src/ibc/mod.rs b/src/ibc/mod.rs index 34b5e863..40f3363e 100644 --- a/src/ibc/mod.rs +++ b/src/ibc/mod.rs @@ -2,8 +2,8 @@ //! //! The IBC module is responsible for handling the IBC channel handshake and handling IBC packets. -#[cfg(not(feature = "library"))] +#[cfg(feature = "export")] pub mod handshake; -#[cfg(not(feature = "library"))] +#[cfg(feature = "export")] pub mod relay; pub mod types; diff --git a/src/lib.rs b/src/lib.rs index f5874f06..2a100123 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,7 +1,7 @@ #![doc = include_str!("../README.md")] #![deny(missing_docs)] -#[cfg(not(feature = "library"))] +#[cfg(feature = "export")] pub mod contract; pub mod helpers; pub mod ibc; diff --git a/testing/contracts/cw-ica-owner/Cargo.toml b/testing/contracts/cw-ica-owner/Cargo.toml index c129b8f2..a088fcf0 100644 --- a/testing/contracts/cw-ica-owner/Cargo.toml +++ b/testing/contracts/cw-ica-owner/Cargo.toml @@ -48,7 +48,7 @@ cosmwasm-std = { version = "1.4.0", features = [ ] } cw-storage-plus = "1.1.0" cw2 = "1.1.0" -cw-ica-controller = { path = "../../..", features = ["library"] } +cw-ica-controller = { path = "../../..", default-features = false } schemars = "0.8.10" serde = { version = "1.0.145", default-features = false, features = ["derive"] } serde-json-wasm = "0.5.1"