Toolkit env-file writer
Implementedv0.0.0
src/core/configure.cpp
This file powers the currently implemented part of `doctor auto`. It locates the toolkit root, renders a shell fragment that exports `CUDA_HOME` and library paths, skips macOS entirely, and only rewrites the env file when the contents actually differ.
Behavior
Env file shapebash
export CUDA_HOME="/path/to/toolkit"
export PATH="$CUDA_HOME/bin:$PATH"
export LD_LIBRARY_PATH="/path/to/toolkit/lib64:${LD_LIBRARY_PATH:-}"- Returns `unsupported` on macOS instead of attempting configuration.
- Returns `missing` when no toolkit root can be found.
- Writes the file only when the content changes.
- Chooses `lib64` when available and falls back to `lib` otherwise.
Related files
Core contract
include/core/configure.hpp
Declares the result type and function used to write a shell env file for the discovered toolkit.
Core implementation
src/core/cuda_env.cpp
Finds `nvcc`, searches common CUDA install roots, parses `nvcc --version`, and derives the toolkit root directory.
Command implementation
src/commands/doctor.cpp
Extends `check` with repo scanning, optional auto-configuration, auto-fix behavior, and next-step generation.