docs: note why native CMake Rust is skipped

CMake 4.4's experimental Rust support compiles each source as its own
crate, links libraries into executables as native .lib inputs instead
of --extern, and has no proc-macro crate type. Keep direct rustc.

Co-Authored-By: qwen (lmstudio/qwen3.8-27b@q3_k_xl): documented decision
This commit is contained in:
2026-09-05 05:17:16 +02:00
parent b7f9fefd78
commit c3a7680e36
+7 -1
View File
@@ -63,7 +63,13 @@ The project contains:
## Build System ## Build System
CMake is configured with `LANGUAGES NONE` and invokes `rustc` through three CMake is configured with `LANGUAGES NONE` and invokes `rustc` through three
custom commands: custom commands. CMake 4.4's experimental native Rust support
(`CMAKE_EXPERIMENTAL_RUST`) was evaluated and rejected: it compiles each
source file as its own crate, so multi-module crates break; it links Rust
libraries into executables as native `.lib` inputs instead of `--extern`;
and it has no `proc-macro` crate type. Keep the direct `rustc` commands.
The three custom commands are:
1. Compile `macros/src/lib.rs` as a host procedural macro. 1. Compile `macros/src/lib.rs` as a host procedural macro.
2. Compile `src/lib.rs` and its modules to `librslibc.rlib`. 2. Compile `src/lib.rs` and its modules to `librslibc.rlib`.