Would love to compile a list of things that are part of "the Rust runtime" so that a constructive answer can be provided to the "Rust doesn't have a runtime" meme. I'll start: Box::new calls the allocator, and in order to keep the heap tidy a lot of work happens at runtime.
-
Show this thread
-
Another one: bounds checks on array access. When the compiler can't prove an array access is within bounds, it'll add runtime checks to ensure out of bounds reads don't occur.
1 reply 0 retweets 3 likesShow this thread -
Another one: stack probes / stack guards. I don't understand these well, but they have something to do with overflow detection at runtime.https://github.com/rust-lang/rust/pull/42816 …
1 reply 0 retweets 2 likesShow this thread -
Replying to @yoshuawuyts
The runtime actually installs an entire signal handler that catches SIGSEGV, just to print a nice message when the stack overflows
1 reply 1 retweet 2 likes
Replying to @sheevink
Ohhh, TIL!
4:32 PM - 19 May 2020
from Berlin, Germany
0 replies
0 retweets
0 likes
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.