File tree Expand file tree Collapse file tree
src/hyperlight-js-runtime/src Expand file tree Collapse file tree Original file line number Diff line number Diff 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" ) ]
7373fn main ( ) {
7474 // dereference RUNTIME to force its initialization
75- // of the Lazy static
75+ // of the LazyLock static
7676 let _ = & * RUNTIME ;
7777}
7878
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ use hashbrown::HashMap;
1919use rquickjs:: loader:: { Loader , Resolver } ;
2020use rquickjs:: module:: ModuleDef ;
2121use rquickjs:: { Ctx , Module , Result } ;
22- use spin:: Lazy ;
22+ use spin:: LazyLock ;
2323
2424pub mod console;
2525pub 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 > ( ) ) ,
You can’t perform that action at this time.
0 commit comments