From f4b2e44644b2fa68049cf99fe20f4b2e43b1d87d Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Tue, 16 Jul 2024 10:45:51 +0200 Subject: [PATCH] runtime-sdk/modules/rofl: Add prelude for ROFL applications --- runtime-sdk/src/modules/rofl/app/mod.rs | 1 + runtime-sdk/src/modules/rofl/app/prelude.rs | 9 +++++++++ tests/runtimes/components-rofl/src/main.rs | 12 +----------- 3 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 runtime-sdk/src/modules/rofl/app/prelude.rs diff --git a/runtime-sdk/src/modules/rofl/app/mod.rs b/runtime-sdk/src/modules/rofl/app/mod.rs index cd063ab831..36ba0b4b9d 100644 --- a/runtime-sdk/src/modules/rofl/app/mod.rs +++ b/runtime-sdk/src/modules/rofl/app/mod.rs @@ -20,6 +20,7 @@ use crate::{ mod client; mod env; mod notifier; +pub mod prelude; mod processor; mod registration; diff --git a/runtime-sdk/src/modules/rofl/app/prelude.rs b/runtime-sdk/src/modules/rofl/app/prelude.rs new file mode 100644 index 0000000000..b649864dc4 --- /dev/null +++ b/runtime-sdk/src/modules/rofl/app/prelude.rs @@ -0,0 +1,9 @@ +//! Prelude for ROFL applications. +pub use std::sync::Arc; + +pub use anyhow::Result; +pub use async_trait::async_trait; + +pub use crate::{self as sdk, core::consensus::verifier::TrustRoot, Version}; + +pub use super::{App, AppId, Environment}; diff --git a/tests/runtimes/components-rofl/src/main.rs b/tests/runtimes/components-rofl/src/main.rs index 374474b6e6..5f57bfacdf 100644 --- a/tests/runtimes/components-rofl/src/main.rs +++ b/tests/runtimes/components-rofl/src/main.rs @@ -1,14 +1,4 @@ -use std::sync::Arc; - -use anyhow::Result; -use async_trait::async_trait; - -use oasis_runtime_sdk::{ - self as sdk, - core::consensus::verifier::TrustRoot, - modules::rofl::app::{App, AppId, Environment}, - Version, -}; +use oasis_runtime_sdk::modules::rofl::app::prelude::*; struct TestApp;