Expand description
§Portable Stack Manipulation
This crate provides portable functions to control the stack pointer and inspect the properties of the stack. This crate does not attempt to provide safe abstractions to any operations, the only goals are correctness, portability and efficiency (in that exact order). As a consequence most functions you will find in this crate are unsafe.
Note, that the stack allocation is left up to the user. Unless you’re writing a safe
abstraction over stack manipulation, this is unlikely to be the crate you want. Instead
consider one of the safe abstractions over this crate such as stacker
. Another good place to
look at is the crates.io’s reverse dependency list.
Macros§
- psm_
stack_ information - Macro that outputs its tokens only if
psm::stack_pointer
andpsm::StackDirection::new
are available. - psm_
stack_ manipulation - Macro that outputs its tokens only if
psm::on_stack
andpsm::replace_stack
are available.
Enums§
- Stack
Direction - The direction into which stack grows as stack frames are made.
Functions§
- on_
stack ⚠ - Run the closure on the provided stack.
- replace_
stack ⚠ - Run the provided non-terminating computation on an entirely new stack.
- stack_
pointer - Returns current stack pointer.