use std::path::PathBuf;
use thiserror::Error;
pub type Result<T> = std::result::Result<T, Error>;
#[derive(Debug, Error)]
pub enum Error {
#[error("nvcc not found: {0}. Set NVCC environment variable or ensure nvcc is in PATH")]
NvccNotFound(String),
#[error("CUDA toolkit not found at {0}")]
CudaToolkitNotFound(PathBuf),
#[error("Failed to detect compute capability: {0}")]
ComputeCapDetectionFailed(String),
#[error("Kernel compilation failed for {path}: {message}")]
CompilationFailed {
path: PathBuf,
message: String,
},
#[error("Linking failed: {0}")]
LinkingFailed(String),
#[error("Source path does not exist: {0}")]
SourcePathNotFound(PathBuf),
#[error("Git operation failed: {0}")]
GitOperationFailed(String),
#[error("IO error: {0}")]
Io(#[from] std::io::Error),
#[error("Cache error: {0}")]
CacheError(String),
#[error("Invalid configuration: {0}")]
InvalidConfig(String),
}