-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix cardano and wasi-filesystem WASM component builds * cleanup http gateway logs * fix
- Loading branch information
Showing
3 changed files
with
6 additions
and
21 deletions.
There are no files selected for viewing
23 changes: 4 additions & 19 deletions
23
hermes/bin/src/runtime_extensions/hermes/http_gateway/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,19 @@ | ||
//! HTTP Gateway | ||
|
||
use gateway_task::spawn; | ||
use rusty_ulid::Ulid; | ||
|
||
mod event; | ||
mod gateway_task; | ||
/// Gateway routing logic | ||
mod routing; | ||
|
||
/// State. | ||
pub(crate) struct State { | ||
/// UID for wasm instance | ||
pub(crate) instance: Ulid, | ||
} | ||
|
||
/// State. | ||
static STATE: once_cell::sync::Lazy<State> = once_cell::sync::Lazy::new(|| { | ||
static STATE: once_cell::sync::Lazy<()> = once_cell::sync::Lazy::new(|| { | ||
spawn(); | ||
|
||
State { | ||
instance: rusty_ulid::Ulid::generate(), | ||
} | ||
}); | ||
|
||
/// New context | ||
pub(crate) fn new_context(ctx: &crate::runtime_context::HermesRuntimeContext) { | ||
println!( | ||
"Instance {:?}\n | ||
App name {:?}", | ||
STATE.instance, | ||
ctx.app_name() | ||
); | ||
pub(crate) fn new_context(_ctx: &crate::runtime_context::HermesRuntimeContext) { | ||
// Init state event | ||
let () = *STATE; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters