Skip to content

Commit 3833453

Browse files
Bump spin from 0.10.0 to 0.11.0 (#161)
* Bump spin from 0.10.0 to 0.11.0 Bumps [spin](https://github.com/zesterer/spin-rs) from 0.10.0 to 0.11.0. - [Changelog](https://github.com/zesterer/spin-rs/blob/master/CHANGELOG.md) - [Commits](https://github.com/zesterer/spin-rs/commits) --- updated-dependencies: - dependency-name: spin dependency-version: 0.11.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * Use LazyLock instead of deprecate Lazy Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Signed-off-by: Jorge Prendes <jorge.prendes@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jorge Prendes <jorge.prendes@gmail.com>
1 parent 2184f10 commit 3833453

4 files changed

Lines changed: 19 additions & 10 deletions

File tree

Cargo.lock

Lines changed: 14 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/hyperlight-js-runtime/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ rquickjs = { version = "0.11", default-features = false, features = ["bindgen",
2626
serde = { version = "1.0.228", default-features = false, features = ["derive", "alloc"] }
2727
serde_json = { version = "1.0.149", default-features = false, features = ["alloc"] }
2828
sha2 = { version = "0.10" , default-features = false, features = ["force-soft"]}
29-
spin = "0.10"
29+
spin = "0.11"
3030
tracing = { version = "0.1.44", default-features = false, features = ["log","attributes","max_level_trace"] }
3131

3232
[target.'cfg(hyperlight)'.dependencies]

src/hyperlight-js-runtime/src/main/hyperlight.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl hyperlight_js_runtime::host::Host for Host {
6262
}
6363
}
6464

65-
static RUNTIME: spin::Lazy<Mutex<JsRuntime>> = spin::Lazy::new(|| {
65+
static RUNTIME: spin::LazyLock<Mutex<JsRuntime>> = spin::LazyLock::new(|| {
6666
Mutex::new(JsRuntime::new(Host).unwrap_or_else(|e| {
6767
panic!("Failed to initialize JS runtime: {e:#?}");
6868
}))
@@ -72,7 +72,7 @@ static RUNTIME: spin::Lazy<Mutex<JsRuntime>> = spin::Lazy::new(|| {
7272
#[instrument(skip_all, level = "info")]
7373
fn main() {
7474
// dereference RUNTIME to force its initialization
75-
// of the Lazy static
75+
// of the LazyLock static
7676
let _ = &*RUNTIME;
7777
}
7878

src/hyperlight-js-runtime/src/modules/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use hashbrown::HashMap;
1919
use rquickjs::loader::{Loader, Resolver};
2020
use rquickjs::module::ModuleDef;
2121
use rquickjs::{Ctx, Module, Result};
22-
use spin::Lazy;
22+
use spin::LazyLock;
2323

2424
pub mod console;
2525
pub mod crypto;
@@ -47,7 +47,7 @@ fn declaration<M: ModuleDef>() -> ModuleDeclarationFn {
4747
declare::<M>
4848
}
4949

50-
static NATIVE_MODULES: Lazy<HashMap<&str, ModuleDeclarationFn>> = Lazy::new(|| {
50+
static NATIVE_MODULES: LazyLock<HashMap<&str, ModuleDeclarationFn>> = LazyLock::new(|| {
5151
HashMap::from([
5252
("io", declaration::<io::js_io>()),
5353
("crypto", declaration::<crypto::js_crypto>()),

0 commit comments

Comments
 (0)