1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//! Oasis Contract SDK.
#![cfg_attr(target_arch = "wasm32", feature(wasm_abi))]

#[cfg(target_arch = "wasm32")]
pub mod abi;
pub mod context;
pub mod contract;
pub mod env;
pub mod error;
pub mod event;
pub mod memory;
pub mod storage;
#[cfg(not(target_arch = "wasm32"))]
pub mod testing;

// Re-export types.
pub use oasis_contract_sdk_types as types;

// Re-export the CBOR crate for use in macros.
pub use cbor;

// Re-exports.
pub use self::{context::Context, contract::Contract, error::Error, event::Event};

// Re-export the SDK support proc-macros.
#[cfg(feature = "oasis-contract-sdk-macros")]
pub use oasis_contract_sdk_macros::*;

// Use `wee_alloc` as the global allocator.
#[cfg(target_arch = "wasm32")]
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;