Skip to content

Release 0.1.14: let a runtime choose its workers' stack size - #17

Merged
pathscale merged 1 commit into
masterfrom
feat/stack-size-0.1.14
Sep 24, 2026
Merged

pathscale merged 1 commit into
masterfrom
feat/stack-size-0.1.14

Conversation

@pathscale

Copy link
Copy Markdown
Owner

Release 0.1.14: Runtime::builder().stack_size(..), so a runtime can choose its workers' stack size.

frontend 0.5.0 depends on it (its parallel feature and its timing example build pools with 16 MiB worker stacks, because a compiler session runs deep recursion on a worker). frontend can only publish once this is on crates.io: today it depends on the feat/stack-size git branch, which crates.io refuses.

This is feat/stack-size (0a608af) cherry-picked onto current master, so history stays linear. It is one commit: the builder option, its docs, and the version bump to 0.1.14.

Checked locally: cargo test --release passes (every suite); cargo publish --dry-run packages 0.1.14 cleanly (the three dead-code warnings are already on master).

After merging: cargo publish for nagoya 0.1.14, then frontend's PR switches to nagoya = "^0.1.14".

A worker's stack is where every task it polls runs, and Runtime had no way
to size it: the threads took the std default, which is RUST_MIN_STACK when
the process has it and two MiB when it does not. A caller whose tasks recurse
deeply had to set that variable before launch, which makes a property of the
runtime depend on whoever started the process.

Runtime::builder() returns a Builder with workers, tuning, label and
stack_size, and build() starts the threads. with_tuning now goes through it,
so new, with_tuning and background() behave as before. A test runs a task
with four MiB of locals on a runtime that asked for sixteen. Release as
0.1.14.
@pathscale
pathscale merged commit 7dbe22d into master Sep 24, 2026
3 checks passed
@pathscale
pathscale deleted the feat/stack-size-0.1.14 branch September 24, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant