From c3a7680e3631828effe991c437efeb7cab5b40c4 Mon Sep 17 00:00:00 2001 From: portersky <24420859+portersky@users.noreply.github.com> Date: Sat, 5 Sep 2026 05:17:16 +0200 Subject: [PATCH] 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 --- AGENTS.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index a512ba0..01fbd5e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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`.