Opt in for 32bit platforms (#44)

This commit is contained in:
Sergey Pepyakin 2018-02-09 11:20:21 +03:00 committed by Nikolay Volf
parent c0ed715b37
commit 6e4bbb7490
2 changed files with 16 additions and 4 deletions

View File

@ -14,3 +14,9 @@ byteorder = "1.0"
[dev-dependencies] [dev-dependencies]
wabt = "0.1.2" wabt = "0.1.2"
[features]
# 32-bit platforms are not supported and not tested. Use this flag if you really want to use
# wasmi on these platforms.
# See https://github.com/pepyakin/wasmi/issues/43
32bit_opt_in = []

View File

@ -101,6 +101,12 @@ extern crate wabt;
extern crate parity_wasm; extern crate parity_wasm;
extern crate byteorder; extern crate byteorder;
#[cfg(all(not(feature = "32bit_opt_in"), target_pointer_width = "32"))]
compile_error! {"32-bit targets are not supported at the moment.
You can use '32bit_opt_in' feature.
See https://github.com/pepyakin/wasmi/issues/43"
}
use std::fmt; use std::fmt;
use std::error; use std::error;
use std::collections::HashMap; use std::collections::HashMap;