Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Cleanup no_std #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ wee_alloc = { version = "0.4.4", optional = true }
qimalloc = { version = "0.1", optional = true }

[features]
default = ["std", "wee_alloc"]
default = ["wee_alloc"]
std = []
debug = []
experimental = []
Expand Down
37 changes: 19 additions & 18 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
- run:
name: Update rustc
command: |
rustup target add wasm32-unknown-unknown
rustup install nightly-x86_64-unknown-linux-gnu
rustup target add wasm32-unknown-unknown --toolchain nightly
rustup component add rustfmt
rustup update
- run:
Expand All @@ -20,28 +21,28 @@ jobs:
- run:
name: Test
command: |
cargo test --target=x86_64-unknown-linux-gnu
cargo test --release --target=x86_64-unknown-linux-gnu
cargo +nightly test --target=x86_64-unknown-linux-gnu
cargo +nightly test --release --target=x86_64-unknown-linux-gnu
- run:
name: Build
command: |
# debug
cargo build
cargo +nightly build
# release
cargo build --release
cargo +nightly build --release
# different allocators
cargo build --release --features wee_alloc
cargo build --release --features qimalloc
cargo +nightly build --release --features wee_alloc
cargo +nightly build --release --features qimalloc
# different allocators (no_std)
cargo build --release --no-default-features --features wee_alloc
cargo build --release --no-default-features --features qimalloc
cargo +nightly build --release --no-default-features --features wee_alloc
cargo +nightly build --release --no-default-features --features qimalloc
# different feature sets
cargo build --release --no-default-features
cargo build --release --features debug
cargo build --release --no-default-features --features debug
cargo build --release --features experimental
cargo build --release --no-default-features --features experimental
cargo build --release --features experimental,debug
cargo build --release --no-default-features --features experimental,debug
cargo build --release --features eth2
cargo build --release --no-default-features --features eth2
cargo +nightly build --release --no-default-features
cargo +nightly build --release --features debug
cargo +nightly build --release --no-default-features --features debug
cargo +nightly build --release --features experimental
cargo +nightly build --release --no-default-features --features experimental
cargo +nightly build --release --features experimental,debug
cargo +nightly build --release --no-default-features --features experimental,debug
cargo +nightly build --release --features eth2
cargo +nightly build --release --no-default-features --features eth2
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![cfg_attr(not(feature = "std"), no_std)]
#![feature(lang_items)]

//! ewasm_api is a library used to interface with Ethereum's EEI in [Ewasm](https://github.com/ewasm/design), a set of enhancements to
//! the Ethereum smart contract platform.
//! ewasm_api exposes both a set of unsafe "native" functions representing the actual EEI
Expand Down
1 change: 1 addition & 0 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub fn unsafe_alloc_buffer(len: usize) -> Vec<u8> {
mod tests {
use super::*;

#[cfg(feature = "std")]
#[test]
fn smoke() {
let ret = unsafe_alloc_buffer(42);
Expand Down