Groundwork for dyn traits

This commit is contained in:
Omar Abdulla
2025-09-17 05:47:13 +03:00
parent 49cbc51546
commit 9fc74aeea0
9 changed files with 665 additions and 212 deletions
+11 -1
View File
@@ -4,7 +4,7 @@
//! provides a helper utility to execute tests.
use revive_dt_compiler::{SolidityCompiler, revive_resolc, solc};
use revive_dt_config::TestingPlatform;
use revive_dt_config::{PlatformIdentifier, TestingPlatform};
use revive_dt_format::traits::ResolverApi;
use revive_dt_node::{Node, geth, kitchensink::KitchensinkNode};
use revive_dt_node_interaction::EthereumNode;
@@ -45,3 +45,13 @@ impl Platform for Kitchensink {
&TestingPlatform::Kitchensink
}
}
/// A trait that describes the interface for the platforms that are supported by the tool.
pub trait DynPlatform {
/// Returns the identifier of this platform.
fn platform_identifier(&self) -> PlatformIdentifier;
/// Creates a new node for the platform by spawning a new thread, creating the node object,
/// initializing it, spawning it, and waiting for it to start up.
fn new_node(&self) -> Box<dyn PlatformNode>;
}