Skip to content

[REFACTOR] Phase out unreachable contrib/rust_extension.cc#19458

Merged
spectrometerHBH merged 1 commit into
apache:mainfrom
tqchen:tvm-phase-out-contrib-rust-extension-cc
Apr 27, 2026
Merged

[REFACTOR] Phase out unreachable contrib/rust_extension.cc#19458
spectrometerHBH merged 1 commit into
apache:mainfrom
tqchen:tvm-phase-out-contrib-rust-extension-cc

Conversation

@tqchen

@tqchen tqchen commented Apr 27, 2026

Copy link
Copy Markdown
Member

This commit removes src/contrib/rust_extension.cc, a 32-line file whose entire body is wrapped in #ifdef RUST_COMPILER_EXT — a macro defined nowhere in the tree, making the file's contents unreachable in any build configuration. The orphaned USE_RUST_EXT cmake option (no longer gates anything after cmake/modules/RustExt.cmake was previously removed) is also removed from CMakeLists.txt, LibInfo.cmake, and libinfo.cc.

Test plan

  • Reconfigure and rebuild: cmake -G Ninja + ninja -j$(nproc) (no errors expected)
  • Verify symbols: confirm libtvm.so and libtvm_runtime.so link without unresolved references
  • Smoke test: tests/python/all-platform-minimal-test/ (~75 tests, ~0.3s)
  • Linting: pre-commit run --all-files

The file's body is wrapped in `#ifdef RUST_COMPILER_EXT` which is
defined nowhere in the tree, making the contents unreachable.
`cmake/modules/RustExt.cmake` was previously removed; the
`USE_RUST_EXT` cmake option became orphan scaffolding. Remove the
source file and the dead `USE_RUST_EXT` option.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request removes the Rust extension support from the project by deleting the USE_RUST_EXT option from CMake configurations, removing the associated metadata from library info, and deleting the src/contrib/rust_extension.cc source file. I have no feedback to provide.

@spectrometerHBH spectrometerHBH merged commit 57cbc5e into apache:main Apr 27, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants