feat: start to implement node_registry
This commit is contained in:
18
packages/runtime_executor_rust/src/lib.rs
Normal file
18
packages/runtime_executor_rust/src/lib.rs
Normal file
@ -0,0 +1,18 @@
|
||||
pub struct NodeRegistryCore {
|
||||
storage_path: String,
|
||||
}
|
||||
|
||||
impl NodeRegistryCore {
|
||||
pub fn new(storage_path: &str) -> NodeRegistryCore {
|
||||
NodeRegistryCore {
|
||||
storage_path: storage_path.to_string()
|
||||
}
|
||||
}
|
||||
|
||||
// Function that takes a string and returns bytes
|
||||
pub fn string_to_bytes(&self, input: &str) -> Vec<u8> {
|
||||
// Combine the initialization argument and input string into bytes
|
||||
let result: Vec<u8> = format!("{} {}", self.storage_path, input).into_bytes();
|
||||
result
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user