agent: Add more Rust code examples, update TODO check (#28737)

Release Notes:

- N/A
This commit is contained in:
Thomas Mickley-Doyle 2025-04-15 11:52:08 -05:00 committed by GitHub
parent d0f806456c
commit b1e4e6048a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
38 changed files with 142 additions and 2 deletions

View file

@ -0,0 +1,3 @@
url = "https://github.com/Rust-GPU/Rust-CUDA.git"
revision = "728013419b6c4c80e099a42413574c36a9aff9c7"
language_extension = "rs"

View file

@ -0,0 +1,4 @@
1. **Reexports `LIBDEVICE_BITCODE` for cleaner dependency usage:** The `LIBDEVICE_BITCODE` symbol from the `cust_raw::nvvm_sys` crate is now reexported via the `nvvm` crate. This allows consuming crates to access the symbol directly from `nvvm`, abstracting away the internal structure and reducing tight coupling to `cust_raw`.
2. **Simplifies dependency graph and usage of NVVM internals:** By removing the direct dependency on `cust_raw` from `rustc_codegen_nvvm`, the changes streamline the crate's external interface, reducing maintenance overhead and improving modularity. Consumers now only need to rely on the higher-level `nvvm` crate.
3. **Improves code readability and encapsulation:** The change makes the source cleaner by reducing low-level, verbose paths like `nvvm_sys::LIBDEVICE_BITCODE` to a concise `LIBDEVICE_BITCODE`, enhancing readability and reinforcing a layered architecture.
4. **Maintains existing functionality:** The code logic remains unchanged in behavior—`LIBDEVICE_BITCODE` is still used in the same way, ensuring that the refactor is safe, non-breaking, and purely organizational.

View file

@ -0,0 +1 @@
I'd like to improve the modularity and encapsulation of the NVVM codegen setup. Please refactor the code to reexport `LIBDEVICE_BITCODE` from the `nvvm` crate instead of accessing it directly from `cust_raw::nvvm_sys`. This involves updating the `nvvm` crate to publicly reexport the symbol, and then modifying `rustc_codegen_nvvm` to use the reexported path. Additionally, remove the direct dependency on `cust_raw` from `rustc_codegen_nvvm/Cargo.toml` and clean up any redundant `use` statements that reference `cust_raw` directly. The goal is to simplify usage of `nvvm_sys` internals by encapsulating them within `nvvm`, making the codebase more maintainable without changing its behavior.