This commit is contained in:
Sergey Pepyakin 2019-04-15 17:15:48 +02:00
parent cd4948e37e
commit f02a356b6b
6 changed files with 32 additions and 9 deletions

View File

@ -28,3 +28,6 @@ libm = { version = "0.1.2", optional = true }
assert_matches = "1.1"
rand = "0.4.2"
wabt = "0.6"
[workspace]
members = ["validation"]

View File

@ -1,8 +0,0 @@
pub mod stack;
/// Index of default linear memory.
pub const DEFAULT_MEMORY_INDEX: u32 = 0;
/// Index of default table.
pub const DEFAULT_TABLE_INDEX: u32 = 0;
// TODO: Move BlockFrame under validation.

View File

@ -380,7 +380,6 @@ impl From<validation::Error> for Error {
}
}
mod common;
mod func;
mod global;
mod host;

12
validation/Cargo.toml Normal file
View File

@ -0,0 +1,12 @@
[package]
name = "wasmi-validation"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2018"
[dependencies]
parity-wasm = { version = "0.31", default-features = false }
[features]
default = ["std"]
std = ["parity-wasm/std"]

17
validation/src/lib.rs Normal file
View File

@ -0,0 +1,17 @@
#![warn(missing_docs)]
#![cfg_attr(not(feature = "std"), no_std)]
//// alloc is required in no_std
#![cfg_attr(not(feature = "std"), feature(alloc))]
#[cfg(not(feature = "std"))]
#[macro_use]
extern crate alloc;
#[cfg(feature = "std")]
extern crate std as alloc;
pub mod stack;
/// Index of default linear memory.
pub const DEFAULT_MEMORY_INDEX: u32 = 0;
/// Index of default table.
pub const DEFAULT_TABLE_INDEX: u32 = 0;