mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-22 05:01:33 +00:00
Get caching working again
This commit is contained in:
@ -16,13 +16,12 @@ use wasmer_runtime_core::{
|
||||
|
||||
/// We check if a provided module is an Emscripten generated one
|
||||
pub fn is_emscripten_module(module: &Module) -> bool {
|
||||
for (_, import_name) in &module.0.info.imported_functions {
|
||||
for (_, import_name) in &module.info().imported_functions {
|
||||
let namespace = module
|
||||
.0
|
||||
.info
|
||||
.info()
|
||||
.namespace_table
|
||||
.get(import_name.namespace_index);
|
||||
let field = module.0.info.name_table.get(import_name.name_index);
|
||||
let field = module.info().name_table.get(import_name.name_index);
|
||||
if field == "_emscripten_memcpy_big" && namespace == "env" {
|
||||
return true;
|
||||
}
|
||||
@ -31,12 +30,12 @@ pub fn is_emscripten_module(module: &Module) -> bool {
|
||||
}
|
||||
|
||||
pub fn get_emscripten_table_size(module: &Module) -> (u32, Option<u32>) {
|
||||
let (_, table) = &module.0.info.imported_tables[ImportedTableIndex::new(0)];
|
||||
let (_, table) = &module.info().imported_tables[ImportedTableIndex::new(0)];
|
||||
(table.minimum, table.maximum)
|
||||
}
|
||||
|
||||
pub fn get_emscripten_memory_size(module: &Module) -> (Pages, Option<Pages>) {
|
||||
let (_, memory) = &module.0.info.imported_memories[ImportedMemoryIndex::new(0)];
|
||||
let (_, memory) = &module.info().imported_memories[ImportedMemoryIndex::new(0)];
|
||||
(memory.minimum, memory.maximum)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user