Skip to content

Commit 3149a1d

Browse files
jakelangaxic
authored andcommitted
Disable std by default
1 parent 865a1a1 commit 3149a1d

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ wee_alloc = { version = "0.4.4", optional = true }
1313
qimalloc = { version = "0.1", optional = true }
1414

1515
[features]
16-
default = ["std", "wee_alloc"]
16+
default = ["wee_alloc"]
1717
std = []
1818
debug = []
1919
experimental = []

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![cfg_attr(not(feature = "std"), no_std)]
2+
13
//! ewasm_api is a library used to interface with Ethereum's EEI in [Ewasm](https://github.com/ewasm/design), a set of enhancements to
24
//! the Ethereum smart contract platform.
35
//! ewasm_api exposes both a set of unsafe "native" functions representing the actual EEI

src/utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ pub fn unsafe_alloc_buffer(len: usize) -> Vec<u8> {
1515
mod tests {
1616
use super::*;
1717

18+
#[cfg(feature = "std")]
1819
#[test]
1920
fn smoke() {
2021
let ret = unsafe_alloc_buffer(42);

0 commit comments

Comments
 (0)