From 5f34d8617b4ebe8f041792c1fbbf99ef2e6fb730 Mon Sep 17 00:00:00 2001 From: FL03 Date: Sun, 25 Feb 2024 15:16:27 -0600 Subject: [PATCH] update Signed-off-by: FL03 --- contained/Cargo.toml | 14 ++++++++++---- contained/src/agents/layer/command.rs | 14 +++++++------- contained/src/cluster/stack.rs | 6 +++--- 3 files changed, 20 insertions(+), 14 deletions(-) diff --git a/contained/Cargo.toml b/contained/Cargo.toml index e36413e..57be3e3 100644 --- a/contained/Cargo.toml +++ b/contained/Cargo.toml @@ -21,9 +21,15 @@ test = false default = ["core", "music", "turing"] full = ["core", "music", "turing"] -core = ["contained-core"] -music = ["contained-music"] -turing = ["contained-turing"] +core = [ + "dep:contained-core" +] +music = [ + "dep:contained-music" +] +turing = [ + "dep:contained-turing" +] [lib] bench = true @@ -42,7 +48,7 @@ contained-turing = { features = [], optional = true, path = "../turing", version anyhow.workspace = true async-trait.workspace = true bytes.workspace = true -decanter = { features = ["derive"], version = "0.1.5" } +decanter = { features = ["derive"], version = "0.1.6" } futures.workspace = true glob = "0.3" lazy_static = "1" diff --git a/contained/src/agents/layer/command.rs b/contained/src/agents/layer/command.rs index dd194f9..ebabc0d 100644 --- a/contained/src/agents/layer/command.rs +++ b/contained/src/agents/layer/command.rs @@ -10,13 +10,13 @@ use super::OneshotSender; use crate::music::neo::LPR; use crate::prelude::BoxedWasmValue; -// use decanter::prelude::H256; +use decanter::prelude::H256; use wasmer::Imports; #[derive(Debug)] pub enum Command { Execute { - module: String, + module: H256, function: String, args: BoxedWasmValue, with: Option, @@ -24,10 +24,10 @@ pub enum Command { }, Include { bytes: Vec, - tx: OneshotSender, + tx: OneshotSender, }, Transform { - id: String, + id: H256, dirac: LPR, tx: OneshotSender, }, @@ -35,7 +35,7 @@ pub enum Command { impl Command { pub fn execute( - module: String, + module: H256, function: String, args: BoxedWasmValue, with: Option, @@ -49,10 +49,10 @@ impl Command { tx, } } - pub fn include(bytes: Vec, tx: OneshotSender) -> Self { + pub fn include(bytes: Vec, tx: OneshotSender) -> Self { Self::Include { bytes, tx } } - pub fn transform(id: String, dirac: LPR, tx: OneshotSender) -> Self { + pub fn transform(id: H256, dirac: LPR, tx: OneshotSender) -> Self { Self::Transform { id, dirac, tx } } } diff --git a/contained/src/cluster/stack.rs b/contained/src/cluster/stack.rs index 324e3c9..4ee190e 100644 --- a/contained/src/cluster/stack.rs +++ b/contained/src/cluster/stack.rs @@ -4,14 +4,14 @@ Description: The stack is a collection of modules and environments that are availible to the cluster */ use crate::agents::VirtualEnv; -// use decanter::prelude::H256; +use decanter::prelude::H256; use std::collections::HashMap; use std::sync::{Arc, RwLock}; use wasmer::Module; pub struct Stack { - pub envs: Arc>>, - pub modules: Arc>>, + pub envs: Arc>>, + pub modules: Arc>>, } impl Stack {