xwasm/
lib.rs

1//! WebAssembly format library
2
3#![cfg_attr(not(feature = "std"), no_std)]
4#![cfg_attr(not(feature = "std"), feature(alloc))]
5
6#![warn(missing_docs)]
7
8extern crate byteorder;
9
10#[cfg(not(feature = "std"))]
11#[macro_use]
12extern crate alloc;
13
14pub mod elements;
15pub mod builder;
16mod io;
17
18pub use elements::{
19	Error as SerializationError,
20	deserialize_buffer,
21	serialize,
22	peek_size,
23};
24
25#[cfg(feature = "std")]
26pub use elements::{
27	deserialize_file,
28	serialize_to_file,
29};
30
31
32
33#[cfg(not(feature = "std"))]
34mod std {
35	pub use core::*;
36	pub use alloc::vec;
37	pub use alloc::string;
38	pub use alloc::boxed;
39	pub use alloc::borrow;
40}