Skip to content

Commit 2892534

Browse files
authored
Merge pull request #56 from ewasm/build-tests
Build all combination of features on Circle CI
2 parents 11c18c0 + e5669bd commit 2892534

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

circle.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,10 @@ jobs:
2323
command: cargo test --target=x86_64-unknown-linux-gnu
2424
- run:
2525
name: Build
26-
command: cargo build --release
26+
command: |
27+
cargo build --release
28+
# debug
29+
cargo build
30+
cargo build --release --no-default-features
31+
cargo build --release --features debug
32+
cargo build --release --no-default-features --features debug

src/debug.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//! The native debug interface exposed to the ewasm contract. These functions are for testing
22
//! purposes only. On a live VM, any bytecode trying to import these symbols will be rejected.
33
4+
use crate::types::*;
5+
46
mod native {
57
extern "C" {
68
pub fn debug_print32(value: u32);
@@ -16,16 +18,16 @@ pub fn print32(value: u32) {
1618
unsafe { native::debug_print32(value) }
1719
}
1820

19-
pub fn print64(value: u32) {
21+
pub fn print64(value: u64) {
2022
unsafe { native::debug_print64(value) }
2123
}
2224

2325
pub fn printMem(slice: &[u8]) {
24-
unsafe { native::debug_printMem(slice.bytes.as_ptr() as *const u32, slice.len()) }
26+
unsafe { native::debug_printMem(slice.as_ptr() as *const u32, slice.len() as u32) }
2527
}
2628

2729
pub fn printMemHex(slice: &[u8]) {
28-
unsafe { native::debug_printMem(slice.bytes.as_ptr() as *const u32, slice.len()) }
30+
unsafe { native::debug_printMem(slice.as_ptr() as *const u32, slice.len() as u32) }
2931
}
3032

3133
pub fn printStorage(key: &StorageKey) {

0 commit comments

Comments
 (0)