swiftide_docker_executor/
lib.rs

1//! A library for executing swiftide agent tools in a docker container
2//!
3//!
4//! # Example
5//!
6//! ```no_run
7//! # use swiftide_agents::Agent;
8//! # use swiftide_docker_executor::DockerExecutor;
9//! # use swiftide_agents::DefaultContext;
10//! # use swiftide_core::ToolExecutor;
11//!
12//! # async fn run() -> Result<(), Box<dyn std::error::Error>> {
13//! let executor = DockerExecutor::default()
14//!     .with_context_path(".")
15//!     .with_image_name("test")
16//!     .with_dockerfile("Dockerfile.overwritten")
17//!     .to_owned()
18//!     .start().await.unwrap();
19//!
20//! let context = DefaultContext::from_executor(executor);
21//! let agent = Agent::builder().context(context);
22//! # Ok(())
23//! # }
24//! ```
25mod client;
26mod container_configurator;
27mod container_starter;
28mod context_builder;
29mod docker_tool_executor;
30mod dockerfile_manager;
31mod dockerfile_mangler;
32mod errors;
33mod image_builder;
34mod running_docker_executor;
35
36#[cfg(test)]
37mod tests;
38
39pub use context_builder::*;
40pub use docker_tool_executor::*;
41pub use errors::*;
42pub use running_docker_executor::*;