#stack #recursion #growth #grow #points #heap #limit

stacker

A stack growth library useful when implementing deeply recursive algorithms that may accidentally blow the stack

18 releases

Uses old Rust 2015

0.1.17 Aug 27, 2024
0.1.15 Jul 23, 2022
0.1.14 May 23, 2021
0.1.13 Jan 14, 2021
0.1.1 Jul 23, 2015

#12 in Algorithms

Download history 186792/week @ 2024-07-28 202608/week @ 2024-08-04 178304/week @ 2024-08-11 219042/week @ 2024-08-18 200001/week @ 2024-08-25 189743/week @ 2024-09-01 197957/week @ 2024-09-08 168019/week @ 2024-09-15 197767/week @ 2024-09-22 208097/week @ 2024-09-29 207923/week @ 2024-10-06 218019/week @ 2024-10-13 217450/week @ 2024-10-20 210502/week @ 2024-10-27 196452/week @ 2024-11-03 222080/week @ 2024-11-10

861,513 downloads per month
Used in 884 crates (55 directly)

MIT/Apache

99KB
2K SLoC

GNU Style Assembly 1K SLoC // 0.1% comments Rust 595 SLoC // 0.1% comments Assembly 138 SLoC // 0.2% comments C 4 SLoC

stacker

Build Status

Documentation

A stack-growth library for Rust. Enables annotating fixed points in programs where the stack may want to grow larger. Spills over to the heap if the stack has hit its limit.

This library is intended on helping implement recursive algorithms.

# Cargo.toml
[dependencies]
stacker = "0.1"

Platform Support

This library currently uses psm for its cross platform capabilities, with a notable exception of Windows, which uses an implementation based on Fibers. See the README for psm for the support table.

On all unsupported platforms this library is a noop. It should compile and run, but it won't actually grow the stack and code will continue to hit the guard pages typically in place.

License

This project is licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this project by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0–8MB
~66K SLoC