mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
dee03da508
The idea is that codex-exec exposes an Environment struct with services on it. Each of those is a trait. Depending on construction parameters passed to Environment they are either backed by local or remote server but core doesn't see these differences.
12 lines
234 B
Rust
12 lines
234 B
Rust
use crate::fs;
|
|
use crate::fs::ExecutorFileSystem;
|
|
|
|
#[derive(Clone, Debug, Default)]
|
|
pub struct Environment;
|
|
|
|
impl Environment {
|
|
pub fn get_filesystem(&self) -> impl ExecutorFileSystem + use<> {
|
|
fs::LocalFileSystem
|
|
}
|
|
}
|