1 { runCommand, cargo, rustc, cargo-show-asm }:
2 runCommand "test-basic" {
3 nativeBuildInputs = [ cargo rustc cargo-show-asm ];
12 #[inline(never)] pub fn add(a: u32, b: u32) -> u32 { a + b }
15 [[ "$(cargo asm add::add | tee /dev/stderr)" == *"lea eax, "* ]]
16 [[ "$(cargo asm --mir add | tee /dev/stderr)" == *"= Add("* ]]