Get the latest tech news

StackSafe: Taming Recursion in Rust Without Stack Overflow


We develop fast Rust crates and release them fast.

A sufficiently deep structure will cause your program to crash with stack overflow, and there’s no clean way to predict or handle this in standard Rust. What’s more, it includes an important safety mechanism: in debug builds, it checks whether the current function is properly annotated with#[stacksafe] whenever you access the wrapped value. This debug-time check helps you identify all potential stack overflow locations during development, rather than discovering them in production when they cause crashes.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Rust

Rust

Photo of Stack Overflow

Stack Overflow

Photo of taming recursion

taming recursion

Related news:

News photo

BlueOS Kernel – Written in Rust, compatible with POSIX

News photo

Red Hat Has Been Rewriting Bash-Based Greenboot In Rust

News photo

He Rewrote Everything in Rust – Then We Got Fired