Moved is_wasm function from api to types crate

This commit is contained in:
ptitSeb
2022-04-20 11:15:56 +02:00
parent 5c609c34f4
commit 63538477f2
5 changed files with 5 additions and 8 deletions

View File

@@ -41,7 +41,6 @@ mod resolver;
mod store;
mod trap;
mod types;
mod utils;
mod wasm_bindgen_polyfill;
/// Implement [`WasmerEnv`] for your type with `#[derive(WasmerEnv)]`.
@@ -75,8 +74,8 @@ pub use crate::js::types::{
TableType, Val, ValType,
};
pub use crate::js::types::{Val as Value, ValType as Type};
pub use crate::js::utils::is_wasm;
pub use wasmer_types::is_wasm;
pub use wasmer_types::{
Atomically, Bytes, ExportIndex, GlobalInit, LocalFunctionIndex, MemoryView, Pages, ValueType,
WASM_MAX_PAGES, WASM_MIN_PAGES, WASM_PAGE_SIZE,

View File

@@ -1,4 +0,0 @@
/// Check if the provided bytes are wasm-like
pub fn is_wasm(bytes: impl AsRef<[u8]>) -> bool {
bytes.as_ref().starts_with(b"\0asm")
}