Increase default stack size to 2MB with opt-out available #59
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix / workaround for issue seen in #56
Add a Cargo feature to allow users to set the stack size if desired, but
default to 2MB to handle more use cases.
@Meziu @AzureMarker what do you think of this approach? Open to alternate naming suggestions on the cargo feature as well, I don't love
big-stack
but wanted to post this as a starting point for discussion.Another approach I considered was exporting a macro like
But it felt a bit clunky and would require every user to set this if their program had large enough stacks. I would imagine that custom stack size is a pretty advanced use case (assuming we pick a good default) so I think it should still be possible for users to opt-out of the default, but I'm not sure of another way besides a Cargo feature.