diff --git a/Cargo.toml b/Cargo.toml index 8766245a2a..35ed0120d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,7 +9,7 @@ categories = ["wasm"] keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" default-run = "wasmtime" [lib] diff --git a/cranelift/Cargo.toml b/cranelift/Cargo.toml index a63e619b6f..b1efe774ec 100644 --- a/cranelift/Cargo.toml +++ b/cranelift/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0 WITH LLVM-exception" documentation = "https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/docs/index.md" repository = "https://github.com/bytecodealliance/wasmtime" publish = false -edition = "2018" +edition = "2021" [[bin]] name = "clif-util" diff --git a/cranelift/bforest/Cargo.toml b/cranelift/bforest/Cargo.toml index cbbee192f5..e5685d98f6 100644 --- a/cranelift/bforest/Cargo.toml +++ b/cranelift/bforest/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime" categories = ["no-std"] readme = "README.md" keywords = ["btree", "forest", "set", "map"] -edition = "2018" +edition = "2021" [dependencies] cranelift-entity = { path = "../entity", version = "0.83.0", default-features = false } diff --git a/cranelift/codegen/Cargo.toml b/cranelift/codegen/Cargo.toml index cb6f352d5b..6956654064 100644 --- a/cranelift/codegen/Cargo.toml +++ b/cranelift/codegen/Cargo.toml @@ -10,7 +10,7 @@ categories = ["no-std"] readme = "README.md" keywords = ["compile", "compiler", "jit"] build = "build.rs" -edition = "2018" +edition = "2021" [dependencies] cranelift-codegen-shared = { path = "./shared", version = "0.83.0" } diff --git a/cranelift/codegen/meta/Cargo.toml b/cranelift/codegen/meta/Cargo.toml index a50b3ea7a5..8cc5138929 100644 --- a/cranelift/codegen/meta/Cargo.toml +++ b/cranelift/codegen/meta/Cargo.toml @@ -6,7 +6,7 @@ description = "Metaprogram for cranelift-codegen code generator library" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" # FIXME(rust-lang/cargo#9300): uncomment once that lands # [package.metadata.docs.rs] diff --git a/cranelift/codegen/shared/Cargo.toml b/cranelift/codegen/shared/Cargo.toml index d11c470b4a..1f10bccfaa 100644 --- a/cranelift/codegen/shared/Cargo.toml +++ b/cranelift/codegen/shared/Cargo.toml @@ -6,7 +6,7 @@ description = "For code shared between cranelift-codegen-meta and cranelift-code license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] # Since this is a shared dependency of several packages, please strive to keep this dependency-free diff --git a/cranelift/entity/Cargo.toml b/cranelift/entity/Cargo.toml index a9ee8e3ebf..8c3df0db10 100644 --- a/cranelift/entity/Cargo.toml +++ b/cranelift/entity/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime" categories = ["no-std"] readme = "README.md" keywords = ["entity", "set", "map"] -edition = "2018" +edition = "2021" [dependencies] serde = { version = "1.0.94", features = ["derive"], optional = true } diff --git a/cranelift/filetests/Cargo.toml b/cranelift/filetests/Cargo.toml index 2f843f6b7f..016b6377cd 100644 --- a/cranelift/filetests/Cargo.toml +++ b/cranelift/filetests/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0 WITH LLVM-exception" documentation = "https://docs.rs/cranelift-filetests" repository = "https://github.com/bytecodealliance/wasmtime" publish = false -edition = "2018" +edition = "2021" [dependencies] cranelift-codegen = { path = "../codegen", version = "0.83.0", features = ["testing_hooks"] } diff --git a/cranelift/frontend/Cargo.toml b/cranelift/frontend/Cargo.toml index 04a329eb3f..e1c1fb7a06 100644 --- a/cranelift/frontend/Cargo.toml +++ b/cranelift/frontend/Cargo.toml @@ -8,7 +8,7 @@ documentation = "https://docs.rs/cranelift-frontend" categories = ["no-std"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false } diff --git a/cranelift/fuzzgen/Cargo.toml b/cranelift/fuzzgen/Cargo.toml index 4b1661c9d4..7eda017323 100644 --- a/cranelift/fuzzgen/Cargo.toml +++ b/cranelift/fuzzgen/Cargo.toml @@ -6,7 +6,7 @@ description = "Cranelift module generator" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" publish = false diff --git a/cranelift/interpreter/Cargo.toml b/cranelift/interpreter/Cargo.toml index fb73c8a59b..5c3e50d8e4 100644 --- a/cranelift/interpreter/Cargo.toml +++ b/cranelift/interpreter/Cargo.toml @@ -8,7 +8,7 @@ documentation = "https://docs.rs/cranelift-interpreter" categories = ["no-std"] license = "Apache-2.0 WITH LLVM-exception" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] cranelift-codegen = { path = "../codegen", version = "0.83.0" } diff --git a/cranelift/isle/fuzz/Cargo.toml b/cranelift/isle/fuzz/Cargo.toml index 52460851f8..656da46466 100644 --- a/cranelift/isle/fuzz/Cargo.toml +++ b/cranelift/isle/fuzz/Cargo.toml @@ -3,7 +3,7 @@ name = "isle-fuzz" version = "0.0.0" authors = ["Automatically generated"] publish = false -edition = "2018" +edition = "2021" [package.metadata] cargo-fuzz = true diff --git a/cranelift/isle/isle/Cargo.toml b/cranelift/isle/isle/Cargo.toml index c884180d1c..a1c45a9d4d 100644 --- a/cranelift/isle/isle/Cargo.toml +++ b/cranelift/isle/isle/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Cranelift Project Developers"] description = "ISLE: Instruction Selection and Lowering Expressions. A domain-specific language for instruction selection in Cranelift." -edition = "2018" +edition = "2021" license = "Apache-2.0 WITH LLVM-exception" name = "cranelift-isle" readme = "../README.md" diff --git a/cranelift/isle/islec/Cargo.toml b/cranelift/isle/islec/Cargo.toml index b29edacba3..cf834627ad 100644 --- a/cranelift/isle/islec/Cargo.toml +++ b/cranelift/isle/islec/Cargo.toml @@ -2,7 +2,7 @@ name = "islec" version = "0.1.0" authors = ["The Cranelift Project Developers"] -edition = "2018" +edition = "2021" license = "Apache-2.0 WITH LLVM-exception" publish = false diff --git a/cranelift/jit/Cargo.toml b/cranelift/jit/Cargo.toml index 67ef9e2a60..aeb9443128 100644 --- a/cranelift/jit/Cargo.toml +++ b/cranelift/jit/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/bytecodealliance/wasmtime" documentation = "https://docs.rs/cranelift-jit" license = "Apache-2.0 WITH LLVM-exception" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] cranelift-module = { path = "../module", version = "0.83.0" } diff --git a/cranelift/module/Cargo.toml b/cranelift/module/Cargo.toml index 2605f48044..97e0e95827 100644 --- a/cranelift/module/Cargo.toml +++ b/cranelift/module/Cargo.toml @@ -8,7 +8,7 @@ documentation = "https://docs.rs/cranelift-module" categories = ["no-std"] license = "Apache-2.0 WITH LLVM-exception" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false } diff --git a/cranelift/native/Cargo.toml b/cranelift/native/Cargo.toml index 99db7940b8..040146b62e 100644 --- a/cranelift/native/Cargo.toml +++ b/cranelift/native/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/bytecodealliance/wasmtime" categories = ["no-std"] license = "Apache-2.0 WITH LLVM-exception" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false } diff --git a/cranelift/object/Cargo.toml b/cranelift/object/Cargo.toml index f925dbe72c..6d2ca37ca7 100644 --- a/cranelift/object/Cargo.toml +++ b/cranelift/object/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/bytecodealliance/wasmtime" documentation = "https://docs.rs/cranelift-object" license = "Apache-2.0 WITH LLVM-exception" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] cranelift-module = { path = "../module", version = "0.83.0" } diff --git a/cranelift/preopt/Cargo.toml b/cranelift/preopt/Cargo.toml index a779cbaa95..7b254094f9 100644 --- a/cranelift/preopt/Cargo.toml +++ b/cranelift/preopt/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime" categories = ["no-std"] readme = "README.md" keywords = ["optimize", "compile", "compiler", "jit"] -edition = "2018" +edition = "2021" [dependencies] cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false } diff --git a/cranelift/reader/Cargo.toml b/cranelift/reader/Cargo.toml index 37a52b46a1..740128fe0e 100644 --- a/cranelift/reader/Cargo.toml +++ b/cranelift/reader/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0 WITH LLVM-exception" documentation = "https://docs.rs/cranelift-reader" repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] cranelift-codegen = { path = "../codegen", version = "0.83.0" } diff --git a/cranelift/serde/Cargo.toml b/cranelift/serde/Cargo.toml index a71bd8b349..06300eca0b 100644 --- a/cranelift/serde/Cargo.toml +++ b/cranelift/serde/Cargo.toml @@ -7,7 +7,7 @@ repository = "https://github.com/bytecodealliance/wasmtime" license = "Apache-2.0 WITH LLVM-exception" readme = "README.md" keywords = ["webassembly", "serde"] -edition = "2018" +edition = "2021" [[bin]] name = "clif-json" diff --git a/cranelift/umbrella/Cargo.toml b/cranelift/umbrella/Cargo.toml index 185fcf2f2a..c3cc8249d1 100644 --- a/cranelift/umbrella/Cargo.toml +++ b/cranelift/umbrella/Cargo.toml @@ -9,7 +9,7 @@ repository = "https://github.com/bytecodealliance/wasmtime" categories = ["no-std"] readme = "README.md" keywords = ["compile", "compiler", "jit"] -edition = "2018" +edition = "2021" [dependencies] cranelift-codegen = { path = "../codegen", version = "0.83.0", default-features = false } diff --git a/cranelift/wasm/Cargo.toml b/cranelift/wasm/Cargo.toml index 959f88a5eb..c91f82e1d0 100644 --- a/cranelift/wasm/Cargo.toml +++ b/cranelift/wasm/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0 WITH LLVM-exception" categories = ["no-std", "wasm"] readme = "README.md" keywords = ["webassembly", "wasm"] -edition = "2018" +edition = "2021" [dependencies] wasmparser = { version = "0.83.0", default-features = false } diff --git a/crates/bench-api/Cargo.toml b/crates/bench-api/Cargo.toml index fef31aa9c8..7393615612 100644 --- a/crates/bench-api/Cargo.toml +++ b/crates/bench-api/Cargo.toml @@ -6,7 +6,7 @@ description = "Exposes a benchmarking API for the Wasmtime runtime" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" publish = false [lib] diff --git a/crates/c-api/Cargo.toml b/crates/c-api/Cargo.toml index ed11a4bdc7..99bb65ac59 100644 --- a/crates/c-api/Cargo.toml +++ b/crates/c-api/Cargo.toml @@ -6,7 +6,7 @@ description = "C API to expose the Wasmtime runtime" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" publish = false [lib] diff --git a/crates/c-api/macros/Cargo.toml b/crates/c-api/macros/Cargo.toml index cc6e1cf0fb..f6eb6ec9df 100644 --- a/crates/c-api/macros/Cargo.toml +++ b/crates/c-api/macros/Cargo.toml @@ -2,7 +2,7 @@ name = "wasmtime-c-api-macros" version = "0.19.0" authors = ["The Wasmtime Project Developers"] -edition = "2018" +edition = "2021" publish = false [lib] diff --git a/crates/c-api/src/func.rs b/crates/c-api/src/func.rs index 76ba0759c0..daf38bd5df 100644 --- a/crates/c-api/src/func.rs +++ b/crates/c-api/src/func.rs @@ -104,6 +104,7 @@ pub unsafe extern "C" fn wasm_func_new_with_env( ) -> Box { let finalizer = crate::ForeignData { data, finalizer }; create_function(store, ty, move |params, results| { + drop(&finalizer); // move entire finalizer into this closure callback(finalizer.data, params, results) }) } @@ -233,6 +234,8 @@ pub(crate) unsafe fn c_callback_to_rust_fn( ) -> impl Fn(Caller<'_, crate::StoreData>, &[Val], &mut [Val]) -> Result<(), Trap> { let foreign = crate::ForeignData { data, finalizer }; move |mut caller, params, results| { + drop(&foreign); // move entire foreign into this closure + // Convert `params/results` to `wasmtime_val_t`. Use the previous // storage in `hostcall_val_storage` to help avoid allocations all the // time. @@ -295,6 +298,7 @@ pub(crate) unsafe fn c_unchecked_callback_to_rust_fn( ) -> impl Fn(Caller<'_, crate::StoreData>, *mut ValRaw) -> Result<(), Trap> { let foreign = crate::ForeignData { data, finalizer }; move |caller, values| { + drop(&foreign); // move entire foreign into this closure let mut caller = wasmtime_caller_t { caller }; match callback(foreign.data, &mut caller, values) { None => Ok(()), diff --git a/crates/cache/Cargo.toml b/crates/cache/Cargo.toml index e86e5653ad..1cc997b30e 100644 --- a/crates/cache/Cargo.toml +++ b/crates/cache/Cargo.toml @@ -6,7 +6,7 @@ description = "Support for automatic module caching with Wasmtime" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" documentation = "https://docs.rs/wasmtime-cache/" -edition = "2018" +edition = "2021" [dependencies] anyhow = "1.0" diff --git a/crates/cache/src/worker.rs b/crates/cache/src/worker.rs index 8ee5aa263c..d2264022b5 100644 --- a/crates/cache/src/worker.rs +++ b/crates/cache/src/worker.rs @@ -230,7 +230,6 @@ impl WorkerThread { #[cfg(target_os = "windows")] fn lower_thread_priority() { - use std::convert::TryInto; use winapi::um::processthreadsapi::{GetCurrentThread, SetThreadPriority}; use winapi::um::winbase::THREAD_MODE_BACKGROUND_BEGIN; diff --git a/crates/environ/Cargo.toml b/crates/environ/Cargo.toml index 61baa9a257..2c9cad640e 100644 --- a/crates/environ/Cargo.toml +++ b/crates/environ/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/bytecodealliance/wasmtime" documentation = "https://docs.rs/wasmtime-environ/" categories = ["wasm"] keywords = ["webassembly", "wasm"] -edition = "2018" +edition = "2021" [dependencies] anyhow = "1.0" diff --git a/crates/fiber/Cargo.toml b/crates/fiber/Cargo.toml index 60076fc7f1..5a3ca38412 100644 --- a/crates/fiber/Cargo.toml +++ b/crates/fiber/Cargo.toml @@ -5,7 +5,7 @@ authors = ["The Wasmtime Project Developers"] description = "Fiber support for Wasmtime" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" -edition = "2018" +edition = "2021" # We link to some native code with symbols that don't change often, so let Cargo # know that we can't show up multiple times in a crate graph. If this is an diff --git a/crates/fuzzing/Cargo.toml b/crates/fuzzing/Cargo.toml index 06ed8f9b23..3c9881702a 100644 --- a/crates/fuzzing/Cargo.toml +++ b/crates/fuzzing/Cargo.toml @@ -1,7 +1,7 @@ [package] authors = ["The Wasmtime Project Developers"] description = "Fuzzing infrastructure for Wasmtime" -edition = "2018" +edition = "2021" name = "wasmtime-fuzzing" publish = false version = "0.19.0" diff --git a/crates/fuzzing/wasm-spec-interpreter/Cargo.toml b/crates/fuzzing/wasm-spec-interpreter/Cargo.toml index bd37c83e6c..e9e3b746bd 100644 --- a/crates/fuzzing/wasm-spec-interpreter/Cargo.toml +++ b/crates/fuzzing/wasm-spec-interpreter/Cargo.toml @@ -4,7 +4,7 @@ description = "A Rust-to-OCaml wrapper for the WebAssembly specification interpr name = "wasm-spec-interpreter" version = "0.1.0" publish = false -edition = "2018" +edition = "2021" license = "Apache-2.0 WITH LLVM-exception" # Until https://gitlab.com/ocaml-rust/ocaml-boxroot/-/issues/1 is resolved and diff --git a/crates/jit-debug/Cargo.toml b/crates/jit-debug/Cargo.toml index cb4594c7b0..f1f4952982 100644 --- a/crates/jit-debug/Cargo.toml +++ b/crates/jit-debug/Cargo.toml @@ -8,7 +8,7 @@ categories = ["development-tools::debugging"] keywords = ["gdb", "jit"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] lazy_static = {version = "1.3.0", optional = true } diff --git a/crates/jit/Cargo.toml b/crates/jit/Cargo.toml index ae0f95ca47..a9022d3916 100644 --- a/crates/jit/Cargo.toml +++ b/crates/jit/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0 WITH LLVM-exception" categories = ["wasm"] keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" -edition = "2018" +edition = "2021" [dependencies] wasmtime-environ = { path = "../environ", version = "=0.36.0" } diff --git a/crates/misc/run-examples/Cargo.toml b/crates/misc/run-examples/Cargo.toml index 76b6470ec1..01167683d6 100644 --- a/crates/misc/run-examples/Cargo.toml +++ b/crates/misc/run-examples/Cargo.toml @@ -2,7 +2,7 @@ name = "run-examples" version = "0.19.0" authors = ["The Wasmtime Project Developers"] -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/crates/runtime/Cargo.toml b/crates/runtime/Cargo.toml index 54838fca40..00e7b94fd7 100644 --- a/crates/runtime/Cargo.toml +++ b/crates/runtime/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0 WITH LLVM-exception" categories = ["wasm"] keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" -edition = "2018" +edition = "2021" [dependencies] wasmtime-environ = { path = "../environ", version = "=0.36.0" } diff --git a/crates/test-programs/Cargo.toml b/crates/test-programs/Cargo.toml index 432e63a418..5bd418f51d 100644 --- a/crates/test-programs/Cargo.toml +++ b/crates/test-programs/Cargo.toml @@ -3,7 +3,7 @@ name = "test-programs" version = "0.19.0" authors = ["The Wasmtime Project Developers"] readme = "README.md" -edition = "2018" +edition = "2021" publish = false license = "Apache-2.0 WITH LLVM-exception" diff --git a/crates/test-programs/wasi-tests/Cargo.toml b/crates/test-programs/wasi-tests/Cargo.toml index c120f463bf..772d398fef 100644 --- a/crates/test-programs/wasi-tests/Cargo.toml +++ b/crates/test-programs/wasi-tests/Cargo.toml @@ -3,7 +3,7 @@ name = "wasi-tests" version = "0.19.0" authors = ["The Wasmtime Project Developers"] readme = "README.md" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/crates/types/Cargo.toml b/crates/types/Cargo.toml index 89165e7936..5898c0cc4d 100644 --- a/crates/types/Cargo.toml +++ b/crates/types/Cargo.toml @@ -6,7 +6,7 @@ description = "WebAssembly type definitions for Cranelift" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" documentation = "https://docs.rs/wasmtime-types" -edition = "2018" +edition = "2021" [dependencies] cranelift-entity = { path = "../../cranelift/entity", version = "0.83.0", features = ['enable-serde'] } diff --git a/crates/wasi-common/Cargo.toml b/crates/wasi-common/Cargo.toml index c8d641e714..b2f7e13740 100644 --- a/crates/wasi-common/Cargo.toml +++ b/crates/wasi-common/Cargo.toml @@ -8,7 +8,7 @@ categories = ["wasm"] keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" include = ["src/**/*", "WASI/phases/**/*", "README.md", "LICENSE", "build.rs"] build = "build.rs" diff --git a/crates/wasi-common/cap-std-sync/Cargo.toml b/crates/wasi-common/cap-std-sync/Cargo.toml index bd9eff831e..96053dcbc8 100644 --- a/crates/wasi-common/cap-std-sync/Cargo.toml +++ b/crates/wasi-common/cap-std-sync/Cargo.toml @@ -8,7 +8,7 @@ categories = ["wasm"] keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" include = ["src/**/*", "README.md", "LICENSE" ] [dependencies] diff --git a/crates/wasi-common/tokio/Cargo.toml b/crates/wasi-common/tokio/Cargo.toml index b904bd0c05..910dbced9b 100644 --- a/crates/wasi-common/tokio/Cargo.toml +++ b/crates/wasi-common/tokio/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0 WITH LLVM-exception" categories = ["wasm"] keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" -edition = "2018" +edition = "2021" include = ["src/**/*", "LICENSE" ] [dependencies] diff --git a/crates/wasi-crypto/Cargo.toml b/crates/wasi-crypto/Cargo.toml index 3151f2ec4c..7fed94356d 100644 --- a/crates/wasi-crypto/Cargo.toml +++ b/crates/wasi-crypto/Cargo.toml @@ -9,7 +9,7 @@ categories = ["wasm", "cryptography"] keywords = ["webassembly", "wasm", "crypto"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] anyhow = "1.0" diff --git a/crates/wasi-nn/Cargo.toml b/crates/wasi-nn/Cargo.toml index 91c773d91e..66fb5213fa 100644 --- a/crates/wasi-nn/Cargo.toml +++ b/crates/wasi-nn/Cargo.toml @@ -9,7 +9,7 @@ categories = ["wasm", "computer-vision"] keywords = ["webassembly", "wasm", "neural-network"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" [dependencies] # These dependencies are necessary for the witx-generation macros to work: diff --git a/crates/wasi-nn/examples/classification-example/Cargo.toml b/crates/wasi-nn/examples/classification-example/Cargo.toml index f74c4eab84..a2efe807b4 100644 --- a/crates/wasi-nn/examples/classification-example/Cargo.toml +++ b/crates/wasi-nn/examples/classification-example/Cargo.toml @@ -3,7 +3,7 @@ name = "wasi-nn-example" version = "0.19.0" authors = ["The Wasmtime Project Developers"] readme = "README.md" -edition = "2018" +edition = "2021" publish = false [dependencies] diff --git a/crates/wasi/Cargo.toml b/crates/wasi/Cargo.toml index 2bf3eaa297..4a5f16fa86 100644 --- a/crates/wasi/Cargo.toml +++ b/crates/wasi/Cargo.toml @@ -8,7 +8,7 @@ categories = ["wasm"] keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" include = ["src/**/*", "README.md", "LICENSE", "build.rs"] build = "build.rs" diff --git a/crates/wasmtime/Cargo.toml b/crates/wasmtime/Cargo.toml index dbdc1c65b3..5331d2c07a 100644 --- a/crates/wasmtime/Cargo.toml +++ b/crates/wasmtime/Cargo.toml @@ -7,7 +7,7 @@ documentation = "https://docs.rs/wasmtime" license = "Apache-2.0 WITH LLVM-exception" repository = "https://github.com/bytecodealliance/wasmtime" readme = "README.md" -edition = "2018" +edition = "2021" [package.metadata.docs.rs] rustdoc-args = ["--cfg", "nightlydoc"] diff --git a/crates/wast/Cargo.toml b/crates/wast/Cargo.toml index bb08763c08..91b4d3a88b 100644 --- a/crates/wast/Cargo.toml +++ b/crates/wast/Cargo.toml @@ -7,7 +7,7 @@ license = "Apache-2.0 WITH LLVM-exception" categories = ["wasm"] keywords = ["webassembly", "wasm"] repository = "https://github.com/bytecodealliance/wasmtime" -edition = "2018" +edition = "2021" [dependencies] anyhow = "1.0.19" diff --git a/crates/wiggle/Cargo.toml b/crates/wiggle/Cargo.toml index 955c5ac98e..a3f2016bc3 100644 --- a/crates/wiggle/Cargo.toml +++ b/crates/wiggle/Cargo.toml @@ -2,7 +2,7 @@ name = "wiggle" version = "0.36.0" authors = ["Pat Hickey ", "Jakub Konka ", "Alex Crichton "] -edition = "2018" +edition = "2021" license = "Apache-2.0 WITH LLVM-exception" description = "Runtime components of wiggle code generator" categories = ["wasm"] diff --git a/crates/wiggle/generate/Cargo.toml b/crates/wiggle/generate/Cargo.toml index 6e12f47125..26e7a35e31 100644 --- a/crates/wiggle/generate/Cargo.toml +++ b/crates/wiggle/generate/Cargo.toml @@ -3,7 +3,7 @@ name = "wiggle-generate" version = "0.36.0" authors = ["Pat Hickey ", "Jakub Konka ", "Alex Crichton "] license = "Apache-2.0 WITH LLVM-exception" -edition = "2018" +edition = "2021" description = "Library crate for wiggle code generator." categories = ["wasm"] keywords = ["webassembly", "wasm"] diff --git a/crates/wiggle/macro/Cargo.toml b/crates/wiggle/macro/Cargo.toml index 01ba9648dd..414f8d9633 100644 --- a/crates/wiggle/macro/Cargo.toml +++ b/crates/wiggle/macro/Cargo.toml @@ -2,7 +2,7 @@ name = "wiggle-macro" version = "0.36.0" authors = ["Pat Hickey ", "Jakub Konka ", "Alex Crichton "] -edition = "2018" +edition = "2021" license = "Apache-2.0 WITH LLVM-exception" description = "Wiggle code generator" categories = ["wasm"] diff --git a/crates/wiggle/test-helpers/Cargo.toml b/crates/wiggle/test-helpers/Cargo.toml index b8360ec375..f8956f1cc6 100644 --- a/crates/wiggle/test-helpers/Cargo.toml +++ b/crates/wiggle/test-helpers/Cargo.toml @@ -3,7 +3,7 @@ name = "wiggle-test" version = "0.21.0" authors = ["Pat Hickey ", "Jakub Konka ", "Alex Crichton "] license = "Apache-2.0 WITH LLVM-exception" -edition = "2018" +edition = "2021" description = "Reusable testing components for wiggle code generator. Only intended to be used by tests in `wiggle` crate." categories = ["wasm"] keywords = ["webassembly", "wasm"] diff --git a/docs/rust_wasi_markdown_parser/Cargo.toml b/docs/rust_wasi_markdown_parser/Cargo.toml index d86767178d..a9562ff1a4 100644 --- a/docs/rust_wasi_markdown_parser/Cargo.toml +++ b/docs/rust_wasi_markdown_parser/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "rust_wasi_markdown_parser" version = "0.1.0" -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/examples/fib-debug/wasm/Cargo.toml b/examples/fib-debug/wasm/Cargo.toml index acf9c47e2f..483a0b05a7 100644 --- a/examples/fib-debug/wasm/Cargo.toml +++ b/examples/fib-debug/wasm/Cargo.toml @@ -2,7 +2,7 @@ name = "example-fib-debug-wasm" version = "0.0.0" authors = ["The Wasmtime Project Developers"] -edition = "2018" +edition = "2021" publish = false [lib] diff --git a/examples/tokio/wasm/Cargo.toml b/examples/tokio/wasm/Cargo.toml index 5704f79630..44894a82af 100644 --- a/examples/tokio/wasm/Cargo.toml +++ b/examples/tokio/wasm/Cargo.toml @@ -2,7 +2,7 @@ name = "example-tokio-wasm" version = "0.0.0" authors = ["The Wasmtime Project Developers"] -edition = "2018" +edition = "2021" publish = false [[bin]] diff --git a/examples/wasi/wasm/Cargo.toml b/examples/wasi/wasm/Cargo.toml index 584b13470f..b8c0225881 100644 --- a/examples/wasi/wasm/Cargo.toml +++ b/examples/wasi/wasm/Cargo.toml @@ -2,7 +2,7 @@ name = "example-wasi-wasm" version = "0.0.0" authors = ["The Wasmtime Project Developers"] -edition = "2018" +edition = "2021" publish = false [[bin]] diff --git a/fuzz/Cargo.toml b/fuzz/Cargo.toml index e0446eb8d4..b9f51265a4 100644 --- a/fuzz/Cargo.toml +++ b/fuzz/Cargo.toml @@ -2,7 +2,7 @@ name = "wasmtime-fuzz" version = "0.0.0" authors = ["The Wasmtime Project Developers"] -edition = "2018" +edition = "2021" publish = false [package.metadata] diff --git a/tests/all/custom_signal_handler.rs b/tests/all/custom_signal_handler.rs index bcaa3fae15..5b6c517ddf 100644 --- a/tests/all/custom_signal_handler.rs +++ b/tests/all/custom_signal_handler.rs @@ -111,7 +111,6 @@ mod tests { move |mut caller: Caller<'_, _>| { let mem = caller.get_export("memory").unwrap().into_memory().unwrap(); let memory = mem.data(&caller); - use std::convert::TryInto; i32::from_le_bytes(memory[0..4].try_into().unwrap()) } });