Neat, `cfg_asm` made it to stable.

I implemented this somewhere last year. It's a niche feature, but useful when writing assembly with some subtle target-specific variations. The cortex-m crate ran into this and currently uses a hack with a custom macro that duplicates the full assembly call on each condition.

exerpt from the rust 1.93.0 release blog post:

cfg attributes on asm! lines

Previously, if individual parts of a section of inline assembly needed to be cfg'd, the full asm! block would need to be repeated with and without that section. In 1.93, cfg can now be applied to individual statements within the asm! block.

```rust
asm!( // or global_asm! or naked_asm!
    "nop",
    #[cfg(target_feature = "sse2")]
    "nop",
    // ...
    #[cfg(target_feature = "sse2")]
    a = const 123, // only used on sse2
);
```
0

If you have a fediverse account, you can quote this note from your own instance. Search https://hachyderm.io/users/folkertdev/statuses/115939652715853438 on your instance and quote it. (Note that quoting is not supported in Mastodon.)

0