From c8dbcd0dae32d9e982665f0189d39e68f5ce2416 Mon Sep 17 00:00:00 2001 From: killf Date: Tue, 3 Mar 2026 15:09:58 +0800 Subject: [PATCH] fix(windows): increase stack size to resolve runtime overflow Windows platforms have a default stack size (1-2MB) that is too small for the heavy JsonSchema derives in config/schema.rs (133 derives). This causes "thread 'main' has overflowed its stack" on startup. Co-Authored-By: Claude Sonnet 4.6 --- .cargo/config.toml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.cargo/config.toml b/.cargo/config.toml index 67d105683..737f4b818 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -10,3 +10,10 @@ linker = "armv7a-linux-androideabi21-clang" [target.aarch64-linux-android] linker = "aarch64-linux-android21-clang" + +# Windows targets — increase stack size for large JsonSchema derives +[target.x86_64-pc-windows-msvc] +rustflags = ["-C", "link-args=/STACK:8388608"] + +[target.aarch64-pc-windows-msvc] +rustflags = ["-C", "link-args=/STACK:8388608"] \ No newline at end of file