Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 14 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/hyperlight-js-runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ rquickjs = { version = "0.11", default-features = false, features = ["bindgen",
serde = { version = "1.0.228", default-features = false, features = ["derive", "alloc"] }
serde_json = { version = "1.0.149", default-features = false, features = ["alloc"] }
sha2 = { version = "0.10" , default-features = false, features = ["force-soft"]}
spin = "0.10"
spin = "0.11"
tracing = { version = "0.1.44", default-features = false, features = ["log","attributes","max_level_trace"] }

[target.'cfg(hyperlight)'.dependencies]
Expand Down
4 changes: 2 additions & 2 deletions src/hyperlight-js-runtime/src/main/hyperlight.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ impl hyperlight_js_runtime::host::Host for Host {
}
}

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

Expand Down
4 changes: 2 additions & 2 deletions src/hyperlight-js-runtime/src/modules/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use hashbrown::HashMap;
use rquickjs::loader::{Loader, Resolver};
use rquickjs::module::ModuleDef;
use rquickjs::{Ctx, Module, Result};
use spin::Lazy;
use spin::LazyLock;

pub mod console;
pub mod crypto;
Expand Down Expand Up @@ -47,7 +47,7 @@ fn declaration<M: ModuleDef>() -> ModuleDeclarationFn {
declare::<M>
}

static NATIVE_MODULES: Lazy<HashMap<&str, ModuleDeclarationFn>> = Lazy::new(|| {
static NATIVE_MODULES: LazyLock<HashMap<&str, ModuleDeclarationFn>> = LazyLock::new(|| {
HashMap::from([
("io", declaration::<io::js_io>()),
("crypto", declaration::<crypto::js_crypto>()),
Expand Down
Loading