Skip to content

Commit a187ff3

Browse files
authored
Merge pull request #61 from ewasm/prelude
Introduce prelude module
2 parents 346b01f + ed5b00b commit a187ff3

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

src/lib.rs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@ cfg_if! {
3636
}
3737

3838
mod native;
39-
pub mod types;
4039
mod utils;
4140

41+
pub mod types;
42+
4243
#[cfg(feature = "debug")]
4344
pub mod debug;
4445

@@ -51,8 +52,24 @@ pub mod convert;
5152
#[cfg(feature = "std")]
5253
use std::vec::Vec;
5354

54-
pub use crate::types::*;
55-
use crate::utils::*;
55+
use types::*;
56+
use utils::*;
57+
58+
/// Re-export of all the basic features.
59+
pub mod prelude {
60+
pub use crate::*;
61+
62+
pub use crate::types::*;
63+
64+
#[cfg(not(feature = "std"))]
65+
pub use crate::convert::*;
66+
67+
#[cfg(feature = "debug")]
68+
pub use crate::debug;
69+
70+
#[cfg(feature = "experimental")]
71+
pub use crate::bignum;
72+
}
5673

5774
/// Enum representing an error code for EEI calls. Currently used by `codeCopy`, `callDataCopy`,
5875
/// `externalCodeCopy`, and `returnDataCopy`.

0 commit comments

Comments
 (0)