Expand description
decuda - migrate CUDA source code to HIP, SYCL, Rust (rust-gpu/cust), or OpenCL.
This is the library entry point. The CLI binary at src/main.rs is a thin
wrapper around cli::run.
Modules§
- cli
- CLI surface for decuda.
- cuda_db
- Database of CUDA runtime / driver APIs and how each maps to the supported targets. The database is loaded once at startup; entries can be queried by API name and target backend.
- emit
- Source-text rewriting engine: applies IR-node span substitutions to a source string for a given target backend.
- ir
- Intermediate representation produced by the CUDA parser and consumed by every target backend.
- migrate
- Migration orchestrator. Walks input, calls parser + emit, writes outputs, builds a report.
- parser
- CUDA parser: preprocessed source -> tree-sitter-cpp for validation + lightweight regex-based scan over the linear source to collect IR nodes about CUDA-specific constructs (qualifiers, runtime calls, built-in variables, header includes).
- preprocess
- Source preprocessor for CUDA kernel launch syntax.
- report
- Migration report: human-readable stdout summary + machine-readable JSON.
- targets
- Per-target translation backends.
- walker
- Directory walking: collect .cu / .cuh files.
Functions§
- version
- Library version pulled from
Cargo.toml.