

Interactive Rust disassembler - adamnemecek
http://rust.godbolt.org/

======
bilalhusain
\- For those clicking the link and feeling unsure how to play around, there's
a panel on top left where you can choose Examples as source, select a name
(there's only one at this time) and click load. Apologies for this silly
advice (wasn't so obvious to me).

\- For those attempting to run the example at Rust home page[1], use `pub fn
main` instead of `fn main`

\- You can also copy paste the following examples (switch on Colourise option
avaiable in the top right panel)

    
    
        // a. will the compiler multiply?
        pub fn hours_to_milliseconds(h: int) -> int {
            h * 60 * 60 * 1000
        }
    
        // b. optimizing index computations inside loop?
        pub fn calculate_brightness(r: &[int, ..256], g: &[int, ..256], b: &[int, ..256]) -> f64 {
            let mut sum = 0;
            for i in range(0u, 128) {
                sum += r[2*i] + r[2*i + 1];
                sum += g[2*i] + g[2*i + 1];
                sum += b[2*i] + b[2*i + 1];
            }
            (sum as f64) / 3.0
        }
    
        // c. macro expansion
        pub fn main() {
            println!("A {} has {} lives", "cat", 9);
        }
    

[1] [http://www.rust-lang.org/](http://www.rust-lang.org/)

------
gfosco
Update the title.. This is a compiler/assembler, not a disassembly tool.

~~~
adamnemecek
If you want to get technical, there's no assembler.

