Twitter | Search | |
rust@embedded:~$ rustup default stable
📣 Pleased to announce the first release of cargo-call-stack A Cargo subcommand for whole program, static stack analysis of programs Pic shows the call graph and stack usage of a program that only does direct function calls 1/3
Reply Retweet Like More
rust@embedded:~$ rustup default stable Dec 3
Replying to @japaricious
With a bit of help from the compiler the tool can also reason about indirect function calls, namely trait objects! Here's a program that does dynamic dispatch. The tool is able to figure out that there only *2* (not 3) trait implementations in the final binary. 2/3
Reply Retweet Like
rust@embedded:~$ rustup default stable Dec 3
Replying to @japaricious
As long as you don't use core::fmt, which uses way too many indirect calls, you should get reasonable results (modulo bugs). If you are curious, the link below shows the call graph of `writeln!(_, "{}", 42)`
Reply Retweet Like
Emil Fresk Dec 3
This is going to be awesome :D
Reply Retweet Like