Migrate most of wasmtime from lazy_static to once_cell (#4368)
* Update tracing-core to a version which doesn't depend on lazy-static. * Update crossbeam-utils to a version that doesn't depend on lazy-static. * Update crossbeam-epoch to a version that doesn't depend on lazy-static. * Update clap to a version that doesn't depend on lazy-static. * Convert Wasmtime's own use of lazy_static to once_cell. * Make `GDB_REGISTRATION`'s comment a doc comment. * Fix compilation on Windows.
This commit is contained in:
@@ -13,10 +13,10 @@ license = "Apache-2.0 WITH LLVM-exception"
|
||||
# `build-libinterpret` feature set by this crate's parent).
|
||||
[dependencies]
|
||||
ocaml-interop = { version = "0.8", optional = true }
|
||||
lazy_static = { version = "1.4", optional = true }
|
||||
once_cell = { version = "1.12.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
wat = "1.0"
|
||||
|
||||
[features]
|
||||
build-libinterpret = ["ocaml-interop", "lazy_static"]
|
||||
build-libinterpret = ["ocaml-interop", "once_cell"]
|
||||
|
||||
@@ -7,13 +7,11 @@
|
||||
//! assert_eq!(results, &[Value::I32(43)]);
|
||||
//! ```
|
||||
use crate::Value;
|
||||
use lazy_static::lazy_static;
|
||||
use ocaml_interop::{OCamlRuntime, ToOCaml};
|
||||
use once_cell::sync::Lazy;
|
||||
use std::sync::Mutex;
|
||||
|
||||
lazy_static! {
|
||||
static ref INTERPRET: Mutex<()> = Mutex::new(());
|
||||
}
|
||||
static INTERPRET: Lazy<Mutex<()>> = Lazy::new(|| Mutex::new(()));
|
||||
|
||||
/// Interpret the first function in the passed WebAssembly module (in Wasm form,
|
||||
/// currently, not WAT), optionally with the given parameters. If no parameters
|
||||
|
||||
Reference in New Issue
Block a user