-
-
Notifications
You must be signed in to change notification settings - Fork 150
Description
After updating my stable toolchain to rustc 1.92.0 (ded5c06cf 2025-12-08) yesterday, I found that I could no longer compile any examples:
thread 'rustc' (6732) has overflowed its stack
error: could not compile `rmk-types` (lib)
The compilation only succeeds if I set the stack size to approximately 64MB via an environment variable: (pwsh)
$env:RUST_MIN_STACK = "67108864"
cargo build
or (bash):
export RUST_MIN_STACK=67108864
cargo build
I attempted to create a minimal reproduction and traced the issue to this specific location:
Lines 14 to 17 in e7577ea
| #[derive(postcard::experimental::max_size::MaxSize)] | |
| pub enum KeyCode { | |
| /// Reserved, no-key. | |
| No = 0x0000, |
The issue disappears if I either remove #[derive(postcard::experimental::max_size::MaxSize)] or reduce the overall size of the enum.
I suspect that Rust 1.92.0 might have introduced changes to macro expansion or other internals, as the compiler's default stack size remains unchanged:
Could we perhaps file an issue with postcard or wait for the macro to stabilize, and maybe notify users that they might need to set RUST_MIN_STACK during compilation?