Decrease default wasm stack to 512k from 1M (#3861)

This commit aims to achieve the goal of being able to run the test suite
on Windows with `--test-threads 1`, or more notably allowing Wasmtime's
defaults to work better with the main thread on Windows which appears to
have a smaller stack by default than Linux by comparison. In decreasing
the default wasm stack size a test is also update to probe for less
stack to work on Windows' main thread by default, ideally allowing the
full test suite to work with `--test-threads 1` (although this isn't
added to CI as it's not really critical).

Closes #3857
This commit is contained in:
Alex Crichton
2022-02-28 12:18:11 -06:00
committed by GitHub
parent 24f145cd1e
commit aeaca2062f
2 changed files with 12 additions and 4 deletions

View File

@@ -4,8 +4,8 @@ use wasmtime::*;
#[test]
fn host_always_has_some_stack() -> anyhow::Result<()> {
static HITS: AtomicUsize = AtomicUsize::new(0);
// assume hosts always have at least 512k of stack
const HOST_STACK: usize = 512 * 1024;
// assume hosts always have at least 128k of stack
const HOST_STACK: usize = 128 * 1024;
let mut store = Store::<()>::default();