ZIm/crates/eval/examples/libdevice_symbol_reexport/criteria.md
2025-04-15 16:52:08 +00:00

1.1 KiB

  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.