Skip to content

Commit 0ae2c87

Browse files
committed
Fix builds
1 parent 78fa885 commit 0ae2c87

File tree

8 files changed

+15
-11
lines changed

8 files changed

+15
-11
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -344,15 +344,15 @@ jobs:
344344
- run:
345345
name: Build library for native target (no features)
346346
working_directory: ~/project/packages/std
347-
command: cargo build --locked --no-default-features
347+
command: cargo build --locked --no-default-features --features std
348348
- run:
349349
name: Build library for wasm target (no features)
350350
working_directory: ~/project/packages/std
351-
command: cargo wasm --locked --no-default-features
351+
command: cargo wasm --locked --no-default-features --features std
352352
- run:
353353
name: Run unit tests (no features)
354354
working_directory: ~/project/packages/std
355-
command: cargo test --locked --no-default-features
355+
command: cargo test --locked --no-default-features --features std
356356
- run:
357357
name: Build library for native target (all features)
358358
working_directory: ~/project/packages/std

contracts/cyberpunk/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ cranelift = ["cosmwasm-vm/cranelift"]
2828

2929
[dependencies]
3030
cosmwasm-schema = { path = "../../packages/schema" }
31-
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["abort", "cosmwasm_1_3"] }
31+
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "abort", "cosmwasm_1_3"] }
3232
rust-argon2 = "0.8"
3333
thiserror = "1.0.26"
3434

contracts/hackatom/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cranelift = ["cosmwasm-vm/cranelift"]
3030

3131
[dependencies]
3232
cosmwasm-schema = { path = "../../packages/schema" }
33-
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["abort"] }
33+
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "abort"] }
3434
schemars = "0.8.3"
3535
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3636
sha2 = "0.10"

contracts/reflect/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ cranelift = ["cosmwasm-vm/cranelift"]
3131

3232
[dependencies]
3333
cosmwasm-schema = { path = "../../packages/schema" }
34-
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking", "stargate", "cosmwasm_1_4"] }
34+
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "staking", "stargate", "cosmwasm_1_4"] }
3535
schemars = "0.8.3"
3636
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3737
thiserror = "1.0.26"

contracts/staking/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ cranelift = ["cosmwasm-vm/cranelift"]
3030

3131
[dependencies]
3232
cosmwasm-schema = { path = "../../packages/schema" }
33-
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["staking"] }
33+
cosmwasm-std = { path = "../../packages/std", default-features = false, features = ["std", "staking"] }
3434
schemars = "0.8.3"
3535
serde = { version = "1.0.103", default-features = false, features = ["derive"] }
3636
snafu = "0.6.6"

devtools/check_workspace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ cargo fmt
99
cd packages/std
1010
# default, min, all
1111
cargo check
12-
cargo check --no-default-features
12+
cargo check --no-default-features --features std
1313
cargo check --features abort,iterator,staking,stargate,cosmwasm_1_2
1414
cargo wasm-debug
1515
cargo wasm-debug --features iterator,staking,stargate

packages/std/src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
extern crate alloc;
22

3+
#[cfg(not(feature = "std"))]
4+
core::compile_error!(
5+
r#"Please enable `cosmwasm-std`'s `std` feature, as we might move existing functionality to that feature in the future.
6+
Builds without the std feature are currently not expected to work. If you need no_std support see #1484.
7+
"#
8+
);
9+
310
// Exposed on all platforms
411

512
mod addresses;

packages/std/src/prelude.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ pub use alloc::string::{String, ToString};
44
pub use alloc::vec;
55
pub use alloc::vec::Vec;
66
pub use core::option::Option::{self, None, Some};
7-
8-
#[cfg(not(feature = "std"))]
9-
core::compile_error!("Please enable `cosmwasm-std`'s `std` feature, as we might move existing functionality to that feature in the future.");

0 commit comments

Comments
 (0)