pub const DEFAULT_R_STACK_SIZE: usize = _; // 8_388_608usizeExpand description
Default stack size for the legacy R-sized thread builder (8 MiB).
R doesn’t enforce a specific stack size - it uses whatever the OS provides:
- Unix: Typically 8 MiB from
ulimit -s - Windows: 64 MiB for the main thread (since R 4.2)
Rust’s default thread stack is only 2 MiB. The legacy builder reserves 8 MiB to match common R-hosting configurations; this sizing choice does not make R API access from the spawned thread supported.