diff --git a/Cargo.lock b/Cargo.lock index 301d4c357483..90eba0638781 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1061,7 +1061,6 @@ checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", - "serde", ] [[package]] @@ -1157,7 +1156,7 @@ dependencies = [ "cfg-if", "derivative", "hashbrown 0.11.2", - "indexmap 1.9.3", + "indexmap 2.13.0", "js-sys", "linera-wasmer-compiler", "linera-wasmer-compiler-cranelift", @@ -1178,7 +1177,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-test", "wasmer-derive", - "wasmer-types", + "wasmer-types 4.4.0-linera.7", "wasmparser 0.121.2", "wat", "windows-sys 0.59.0", @@ -1210,7 +1209,7 @@ dependencies = [ "smallvec", "thiserror", "wasmer-object", - "wasmer-types", + "wasmer-types 4.4.0-linera.7", "wasmparser 0.121.2", "windows-sys 0.59.0", "xxhash-rust", @@ -1232,7 +1231,7 @@ dependencies = [ "smallvec", "target-lexicon", "tracing", - "wasmer-types", + "wasmer-types 4.4.0-linera.7", ] [[package]] @@ -1251,7 +1250,7 @@ dependencies = [ "rayon", "smallvec", "target-lexicon", - "wasmer-types", + "wasmer-types 4.4.0-linera.7", ] [[package]] @@ -1267,7 +1266,7 @@ dependencies = [ "derivative", "enum-iterator", "fnv", - "indexmap 1.9.3", + "indexmap 2.13.0", "lazy_static", "libc", "loupe", @@ -1280,7 +1279,7 @@ dependencies = [ "serde", "thiserror", "tracing", - "wasmer-types", + "wasmer-types 4.4.0-linera.7", "windows-sys 0.59.0", ] @@ -2657,7 +2656,29 @@ checksum = "55ff9bd75c81a20b751cecc9d5e056c7d7212950d423664155fd517cdd5d926f" dependencies = [ "object 0.29.0", "thiserror", - "wasmer-types", + "wasmer-types 4.4.0", +] + +[[package]] +name = "wasmer-types" +version = "4.4.0-linera.7" +dependencies = [ + "bytecheck", + "enum-iterator", + "enumset", + "getrandom 0.2.17", + "hex", + "indexmap 2.13.0", + "loupe", + "memoffset", + "more-asserts", + "rkyv", + "serde", + "serde_bytes", + "sha2", + "target-lexicon", + "thiserror", + "xxhash-rust", ] [[package]] @@ -2672,11 +2693,8 @@ dependencies = [ "getrandom 0.2.17", "hex", "indexmap 1.9.3", - "loupe", "more-asserts", "rkyv", - "serde", - "serde_bytes", "sha2", "target-lexicon", "thiserror", @@ -2712,7 +2730,7 @@ dependencies = [ "tracing", "tracing-subscriber", "ureq", - "wasmer-types", + "wasmer-types 4.4.0-linera.7", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 091d5be0b99e..eada2c8bd594 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -57,7 +57,7 @@ members = [ # "lib/package", # "lib/registry", # "lib/sys-utils", - # "lib/types", + "lib/types", # "lib/virtual-io", # "lib/virtual-fs", # "lib/virtual-net", @@ -102,7 +102,7 @@ wasmer-wasix = { path = "./lib/wasix" } macro-wasmer-universal-test = "=4.4.0" wasmer-derive = "=4.4.0" wasmer-object = "=4.4.0" -wasmer-types = "=4.4.0" +wasmer-types = { version = "=4.4.0-linera.7", path = "lib/types" } webc = { version = "6.1.0", default-features = false, features = ["package"] } shared-buffer = "0.1.4" @@ -114,7 +114,7 @@ reqwest = { version = "0.12.0", default-features = false } enumset = "1.1.0" memoffset = "0.9.0" wasmparser = { version = "0.121.0", default-features = false } -rkyv = { version = "0.7.40", features = ["indexmap", "validation", "strict"] } +rkyv = { version = "0.7.40", features = ["validation"] } memmap2 = { version = "0.6.2" } toml = {version = "0.5.9", features = ["preserve_order"]} indexmap = "2" diff --git a/lib/api/Cargo.toml b/lib/api/Cargo.toml index 08df429bd212..ab54c98a6531 100644 --- a/lib/api/Cargo.toml +++ b/lib/api/Cargo.toml @@ -27,7 +27,7 @@ crate-type = ["cdylib", "lib"] # Shared dependencies. [dependencies] # - Mandatory shared dependencies. -indexmap = { version = "1.6" } +indexmap = { workspace = true } cfg-if = "1.0" thiserror = "1.0" more-asserts = "0.2" diff --git a/lib/types/Cargo.toml b/lib/types/Cargo.toml index ccc41f73b39e..53421ea95920 100644 --- a/lib/types/Cargo.toml +++ b/lib/types/Cargo.toml @@ -20,7 +20,7 @@ serde = { version = "1.0", features = [ serde_bytes = { version = "0.11", optional = true } thiserror = "1.0" more-asserts = "0.2" -indexmap = { version = "1.6" } +indexmap = { workspace = true } rkyv = { workspace = true } enum-iterator = "0.7.0" target-lexicon = { version = "0.12.2", default-features = false } @@ -45,7 +45,7 @@ memoffset.workspace = true default = ["std"] std = [] core = [] -enable-serde = ["serde", "serde/std", "serde_bytes", "indexmap/serde-1"] +enable-serde = ["serde", "serde/std", "serde_bytes", "indexmap/serde"] artifact-size = ["dep:loupe"] [package.metadata.docs.rs] diff --git a/lib/types/src/module.rs b/lib/types/src/module.rs index ea77fe8d5f47..9381e3c6114e 100644 --- a/lib/types/src/module.rs +++ b/lib/types/src/module.rs @@ -193,8 +193,8 @@ pub struct ModuleInfo { pub struct ArchivableModuleInfo { name: Option, hash: Option, - imports: IndexMap, - exports: IndexMap, + imports: Vec<(ImportKey, ImportIndex)>, + exports: Vec<(String, ExportIndex)>, start_function: Option, table_initializers: Vec, passive_elements: BTreeMap>, @@ -206,7 +206,7 @@ pub struct ArchivableModuleInfo { tables: PrimaryMap, memories: PrimaryMap, globals: PrimaryMap, - custom_sections: IndexMap, + custom_sections: Vec<(String, CustomSectionIndex)>, custom_sections_data: PrimaryMap>, num_imported_functions: usize, num_imported_tables: usize, @@ -219,8 +219,8 @@ impl From for ArchivableModuleInfo { Self { name: it.name, hash: it.hash, - imports: it.imports, - exports: it.exports, + imports: it.imports.into_iter().collect(), + exports: it.exports.into_iter().collect(), start_function: it.start_function, table_initializers: it.table_initializers, passive_elements: it.passive_elements.into_iter().collect(), @@ -232,7 +232,7 @@ impl From for ArchivableModuleInfo { tables: it.tables, memories: it.memories, globals: it.globals, - custom_sections: it.custom_sections, + custom_sections: it.custom_sections.into_iter().collect(), custom_sections_data: it.custom_sections_data, num_imported_functions: it.num_imported_functions, num_imported_tables: it.num_imported_tables, @@ -248,8 +248,8 @@ impl From for ModuleInfo { id: Default::default(), name: it.name, hash: it.hash, - imports: it.imports, - exports: it.exports, + imports: it.imports.into_iter().collect(), + exports: it.exports.into_iter().collect(), start_function: it.start_function, table_initializers: it.table_initializers, passive_elements: it.passive_elements.into_iter().collect(), @@ -261,7 +261,7 @@ impl From for ModuleInfo { tables: it.tables, memories: it.memories, globals: it.globals, - custom_sections: it.custom_sections, + custom_sections: it.custom_sections.into_iter().collect(), custom_sections_data: it.custom_sections_data, num_imported_functions: it.num_imported_functions, num_imported_tables: it.num_imported_tables, diff --git a/lib/vm/Cargo.toml b/lib/vm/Cargo.toml index 7941aab82a5d..3394f7f528af 100644 --- a/lib/vm/Cargo.toml +++ b/lib/vm/Cargo.toml @@ -17,7 +17,7 @@ memoffset.workspace = true dashmap.workspace = true wasmer-types.workspace = true libc.workspace = true -indexmap = { version = "1.6" } +indexmap = { workspace = true } thiserror = "1.0" more-asserts = "0.2" cfg-if = "1.0" @@ -58,7 +58,7 @@ unexpected_cfgs = { level = "warn", check-cfg = ['cfg(missing_rust_probestack)'] [features] default = [] -enable-serde = ["serde", "indexmap/serde-1", "wasmer-types/enable-serde"] +enable-serde = ["serde", "indexmap/serde", "wasmer-types/enable-serde"] artifact-size = ["dep:loupe", "wasmer-types/artifact-size"] [package.metadata.docs.rs] diff --git a/rust-toolchain b/rust-toolchain index 9242d8e7ab88..d8ac93bea02e 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.76 +1.93.1