wasmer/src/utils.rs

7 lines
197 B
Rust
Raw Normal View History

2019-01-19 00:28:41 -06:00
//! Utility functions for the WebAssembly module
2018-10-24 11:44:33 +02:00
2019-01-19 00:28:41 -06:00
/// Detect if a provided binary is a Wasm file
pub fn is_wasm_binary(binary: &[u8]) -> bool {
binary.starts_with(&[b'\0', b'a', b's', b'm'])
}