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:
@@ -63,7 +63,13 @@ The project contains:
|
||||
## Build System
|
||||
|
||||
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.
|
||||
2. Compile `src/lib.rs` and its modules to `librslibc.rlib`.
|
||||
|
||||
Reference in New Issue
Block a user