( mut self, process: &Process
,
@@ -69,6 +73,16 @@ impl<'a, D: LocalDeploy<'a>> DeployFlow<'a, D> {
.insert(cluster.id, spec.build(cluster.id, &tag_name));
self
}
+
+ pub fn compile_no_network(mut self) -> CompiledFlow<'a, D::GraphId> {
+ self.used = true;
+
+ CompiledFlow {
+ hydroflow_ir: build_inner(&mut self.ir),
+ extra_stmts: BTreeMap::new(),
+ _phantom: PhantomData,
+ }
+ }
}
impl<'a, D: Deploy<'a>> DeployFlow<'a, D> {
diff --git a/hydroflow_plus/src/builder/mod.rs b/hydroflow_plus/src/builder/mod.rs
index a15cea44dd6..1db3581a208 100644
--- a/hydroflow_plus/src/builder/mod.rs
+++ b/hydroflow_plus/src/builder/mod.rs
@@ -3,11 +3,14 @@ use std::collections::HashMap;
use std::marker::PhantomData;
use std::rc::Rc;
+use compiled::CompiledFlow;
+use deploy::{DeployFlow, DeployResult};
use stageleft::*;
+use crate::deploy::{ExternalSpec, IntoProcessSpec, LocalDeploy};
use crate::ir::HfPlusLeaf;
use crate::location::{Cluster, ExternalProcess, Process};
-use crate::RuntimeContext;
+use crate::{ClusterSpec, Deploy, RuntimeContext};
pub mod built;
pub mod compiled;
@@ -98,7 +101,7 @@ impl<'a> FlowBuilder<'a> {
}
}
- pub fn with_default_optimize(self) -> built::BuiltFlow<'a> {
+ pub fn with_default_optimize >(
+ self,
+ process: &Process ,
+ spec: impl IntoProcessSpec<'a, D>,
+ ) -> DeployFlow<'a, D> {
+ self.with_default_optimize().with_process(process, spec)
+ }
+
+ pub fn with_external >(
+ self,
+ process: &ExternalProcess ,
+ spec: impl ExternalSpec<'a, D>,
+ ) -> DeployFlow<'a, D> {
+ self.with_default_optimize().with_external(process, spec)
+ }
+
+ pub fn with_cluster