aft-base 0.67.1

Shared foundation for Agent Foundational Toolkit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Checkout paths supplied by the test runner, including relocated nextest archives.

use std::path::{Path, PathBuf};
use std::sync::OnceLock;

pub fn manifest_dir() -> &'static Path {
    static DIRECTORY: OnceLock<PathBuf> = OnceLock::new();
    DIRECTORY
        .get_or_init(|| {
            std::env::var_os("CARGO_MANIFEST_DIR")
                .map(PathBuf::from)
                .expect("CARGO_MANIFEST_DIR must be set at runtime by Cargo or nextest")
        })
        .as_path()
}