Rust compiled with optimizations shows empty assembly
See original GitHub issueRustc 1.9.0 seems to be the last version that works with -O
. All newer version show an empty assembly if the (default) “Directives” filter is enabled.
Issue Analytics
- State:
- Created 7 years ago
- Comments:21 (14 by maintainers)
Top Results From Across the Web
Rust compiled with optimizations shows empty assembly #139
Rustc 1.9.0 seems to be the last version that works with -O. All newer version show an empty assembly if the (default) "Directives"...
Read more >Why the assembly output of a compiled rust code does not ...
And since your library does not have any public symbol, it does nothing and your asm is empty. The solution, either: Declare your...
Read more >Unusual missed optimization for signed integers modulo `1<<k`?
afetisov: You pass it a local variable by copy, so whatever it does inside has no effect on outer optimizations.
Read more >Interacting with assembly in Rust - LogRocket Blog
In this guide, we'll explore what tools the Rust community has to offer for extracting and embedding assembly.
Read more >Viewing assembly for Rust function | by George Shuklin
Turned out, it wasn't cargo asm fault… Optimize, inline, eliminate! After I removed bulky criterion and assembly generation become fast, I was ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Adding a
#[no_mangle]
attribute to the top-level functions fixes the problem. So it’s either a problem with name mangling or Rust doesn’t include mangled top-level functions in the output anymore.Great stuff! just making sure I hadn’t missed anything!